Henri Verbeet : wined3d: Call SetDestWindowOverride() before acquiring a context.
Alexandre Julliard
julliard at winehq.org
Fri Feb 5 08:42:30 CST 2010
Module: wine
Branch: master
Commit: d0afc7567b33f64f0a441d9a3ffeeeb4a81a5e43
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d0afc7567b33f64f0a441d9a3ffeeeb4a81a5e43
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Feb 4 18:30:07 2010 +0100
wined3d: Call SetDestWindowOverride() before acquiring a context.
---
dlls/wined3d/swapchain.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 6b44cd5..838d461 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -217,6 +217,8 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
unsigned int sync;
int retval;
+ IWineD3DSwapChain_SetDestWindowOverride(iface, hDestWindowOverride);
+
context = context_acquire(This->device, This->backBuffer[0], CTXUSAGE_RESOURCELOAD);
/* Render the cursor onto the back buffer, using our nifty directdraw blitting code :-) */
@@ -274,11 +276,6 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
TRACE("presetting HDC %p\n", This->context[0]->hdc);
- /* Don't call checkGLcall, as glGetError is not applicable here */
- if (hDestWindowOverride && This->win_handle != hDestWindowOverride) {
- IWineD3DSwapChain_SetDestWindowOverride(iface, hDestWindowOverride);
- }
-
render_to_fbo = This->render_to_fbo;
if (pSourceRect)
@@ -522,7 +519,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapCh
WINED3DLOCKED_RECT r;
BYTE *mem;
- if(window == This->win_handle) return WINED3D_OK;
+ if (!window || window == This->win_handle) return WINED3D_OK;
TRACE("Performing dest override of swapchain %p from window %p to %p\n", This, This->win_handle, window);
if (This->context[0] == This->device->contexts[0])
More information about the wine-cvs
mailing list