From 7538f8d620e3da080c847e9a782d579fb59d67eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 29 Apr 2007 16:36:03 +0200 Subject: [PATCH] wined3d: Fix front buffer coords for gdi surfaces. --- dlls/wined3d/surface_gdi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 3c412dbf23b..7d277d46033 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -68,6 +68,13 @@ x11_copy_to_screen(IWineD3DSurfaceImpl *This, TRACE(" copying rect (%d,%d)->(%d,%d), offset (%d,%d)\n", rc->left, rc->top, rc->right, rc->bottom, offset.x, offset.y); } + + /* Front buffer coordinates are screen coordinates. Map them to the destination + * window if not fullscreened + */ + if(!This->resource.wineD3DDevice->ddraw_fullscreen) { + ClientToScreen(hDisplayWnd, &offset); + } #if 0 /* FIXME: this doesn't work... if users really want to run * X in 8bpp, then we need to call directly into display.drv @@ -88,7 +95,7 @@ x11_copy_to_screen(IWineD3DSurfaceImpl *This, if (This->clipper) { RECT xrc; - HWND hwnd = This->clipper->hWnd; + HWND hwnd = ((IWineD3DClipperImpl *) This->clipper)->hWnd; if (hwnd && GetClientRect(hwnd,&xrc)) { OffsetRect(&xrc,offset.x,offset.y);