Commit d1bc6309 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: Another devmode bug.

parent ef561429
...@@ -1359,7 +1359,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic ...@@ -1359,7 +1359,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
ReleaseDC(0, hdc); ReleaseDC(0, hdc);
/* Change the display settings */ /* Change the display settings */
memset(&devmode, 0, sizeof(DEVMODEW)); memset(&devmode, 0, 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 >= 24) ? 32 : bpp; /* Stupid XVidMode cannot change bpp */
devmode.dmPelsWidth = pPresentationParameters->BackBufferWidth; devmode.dmPelsWidth = pPresentationParameters->BackBufferWidth;
...@@ -2042,6 +2043,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U ...@@ -2042,6 +2043,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
* but we don't have any hwnd * but we don't have any hwnd
*/ */
memset(&devmode, 0, 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; if(devmode.dmBitsPerPel == 24) devmode.dmBitsPerPel = 32;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment