Commit 38147d28 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Set the main hwnd before setting up the screen.

parent 9a177b64
......@@ -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];
......
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