From d6bbe90b859f304741a2fbecf081d71b93c0e885 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 15 Mar 2010 21:07:28 +0100 Subject: [PATCH] wined3d: The swapchain should always have a window handle. --- dlls/wined3d/device.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5dfc560b281..dc1cf29b2c3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6625,7 +6625,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE IWineD3DDevice_SetDisplayMode(iface, 0, &mode); - if(swapchain->win_handle && !pPresentationParameters->Windowed) { + if (!pPresentationParameters->Windowed) + { if(swapchain->presentParms.Windowed) { /* switch from windowed to fs */ swapchain_setup_fullscreen_window(swapchain, pPresentationParameters->BackBufferWidth, @@ -6636,7 +6637,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight, TRUE); } - } else if(swapchain->win_handle && !swapchain->presentParms.Windowed) { + } + else if (!swapchain->presentParms.Windowed) + { /* Fullscreen -> windowed switch */ swapchain_restore_fullscreen_window(swapchain); } -- 2.11.4.GIT