The swapchain's current window might be changed by SetDestWindowOverride().
pPresentationParameters->BackBufferHeight);
} else {
/* Fullscreen -> fullscreen mode change */
- MoveWindow(swapchain->win_handle, 0, 0,
+ MoveWindow(swapchain->device_window, 0, 0,
pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight,
TRUE);
}
void swapchain_setup_fullscreen_window(IWineD3DSwapChainImpl *swapchain, UINT w, UINT h)
{
IWineD3DDeviceImpl *device = swapchain->device;
- HWND window = swapchain->win_handle;
+ HWND window = swapchain->device_window;
BOOL filter_messages;
LONG style, exstyle;
void swapchain_restore_fullscreen_window(IWineD3DSwapChainImpl *swapchain)
{
IWineD3DDeviceImpl *device = swapchain->device;
- HWND window = swapchain->win_handle;
+ HWND window = swapchain->device_window;
BOOL filter_messages;
LONG style, exstyle;
swapchain->parent = parent;
swapchain->ref = 1;
swapchain->win_handle = window;
+ swapchain->device_window = window;
if (!present_parameters->Windowed && window)
{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
HDC hDC;
TRACE("(%p) : pRamp@%p flags(%d)\n", This, pRamp, Flags);
- hDC = GetDC(This->win_handle);
+ hDC = GetDC(This->device_window);
SetDeviceGammaRamp(hDC, (LPVOID)pRamp);
- ReleaseDC(This->win_handle, hDC);
+ ReleaseDC(This->device_window, hDC);
return WINED3D_OK;
}
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
HDC hDC;
TRACE("(%p) : pRamp@%p\n", This, pRamp);
- hDC = GetDC(This->win_handle);
+ hDC = GetDC(This->device_window);
GetDeviceGammaRamp(hDC, pRamp);
- ReleaseDC(This->win_handle, hDC);
+ ReleaseDC(This->device_window, hDC);
return WINED3D_OK;
}
unsigned int num_contexts;
HWND win_handle;
+ HWND device_window;
};
const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl DECLSPEC_HIDDEN;