wined3d: Remove 24/32 bit hacks.

This commit is contained in:
Stefan Dösinger 2007-12-11 16:38:18 +01:00 committed by Alexandre Julliard
parent 96504632de
commit 51adbf5bbf
1 changed files with 2 additions and 3 deletions

View File

@ -1520,7 +1520,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
memset(&devmode, 0, sizeof(devmode)); memset(&devmode, 0, sizeof(devmode));
devmode.dmSize = sizeof(devmode); devmode.dmSize = sizeof(devmode);
devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
devmode.dmBitsPerPel = (bpp >= 24) ? 32 : bpp; /* Stupid XVidMode cannot change bpp */ devmode.dmBitsPerPel = bpp;
devmode.dmPelsWidth = pPresentationParameters->BackBufferWidth; devmode.dmPelsWidth = pPresentationParameters->BackBufferWidth;
devmode.dmPelsHeight = pPresentationParameters->BackBufferHeight; devmode.dmPelsHeight = pPresentationParameters->BackBufferHeight;
ChangeDisplaySettingsExW(This->adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL); ChangeDisplaySettingsExW(This->adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL);
@ -1650,7 +1650,7 @@ error:
memset(&devmode, 0, sizeof(devmode)); memset(&devmode, 0, sizeof(devmode));
devmode.dmSize = sizeof(devmode); devmode.dmSize = sizeof(devmode);
devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
devmode.dmBitsPerPel = (formatDesc->bpp >= 3) ? 32 : formatDesc->bpp * 8; /* Stupid XVidMode cannot change bpp */ devmode.dmBitsPerPel = formatDesc->bpp * 8;
devmode.dmPelsWidth = object->orig_width; devmode.dmPelsWidth = object->orig_width;
devmode.dmPelsHeight = object->orig_height; devmode.dmPelsHeight = object->orig_height;
ChangeDisplaySettingsExW(This->adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL); ChangeDisplaySettingsExW(This->adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL);
@ -2327,7 +2327,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
devmode.dmSize = sizeof(devmode); devmode.dmSize = sizeof(devmode);
devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
devmode.dmBitsPerPel = formatDesc->bpp * 8; devmode.dmBitsPerPel = formatDesc->bpp * 8;
if(devmode.dmBitsPerPel == 24) devmode.dmBitsPerPel = 32;
devmode.dmPelsWidth = pMode->Width; devmode.dmPelsWidth = pMode->Width;
devmode.dmPelsHeight = pMode->Height; devmode.dmPelsHeight = pMode->Height;