diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dd6bde8c953..a595840bc7e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1385,6 +1385,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic if (!object->win_handle) { object->win_handle = This->createParms.hFocusWindow; } + if(!This->ddraw_window) IWineD3DDevice_SetHWND(iface, object->win_handle); hDc = GetDC(object->win_handle); TRACE("Using hDc %p\n", hDc); @@ -2002,8 +2003,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR } This->swapchains[0] = (IWineD3DSwapChain *) swapchain; - if(!This->ddraw_window) IWineD3DDevice_SetHWND(iface, swapchain->win_handle); - if(swapchain->backBuffer && swapchain->backBuffer[0]) { TRACE("Setting rendertarget to %p\n", swapchain->backBuffer); This->render_targets[0] = swapchain->backBuffer[0];