Henri Verbeet : wined3d: Translate front buffer coordinates in surface_blt_to_drawable().

Alexandre Julliard julliard at winehq.org
Thu May 20 11:03:00 CDT 2010


Module: wine
Branch: master
Commit: a2a58a21d89e1d73a7d7659aeed46445e6c7c079
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a2a58a21d89e1d73a7d7659aeed46445e6c7c079

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu May 20 09:12:22 2010 +0200

wined3d: Translate front buffer coordinates in surface_blt_to_drawable().

---

 dlls/wined3d/surface.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 811ba11..9e1d434 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4350,6 +4350,24 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
         dst_rect = src_rect;
     }
 
+    if ((This->Flags & SFLAG_SWAPCHAIN) && This == ((IWineD3DSwapChainImpl *)This->container)->front_buffer)
+    {
+        RECT windowsize;
+        POINT offset = {0, 0};
+        UINT h;
+
+        ClientToScreen(context->win_handle, &offset);
+        GetClientRect(context->win_handle, &windowsize);
+        h = windowsize.bottom - windowsize.top;
+
+        dst_rect.left -= offset.x;
+        dst_rect.right -=offset.x;
+        dst_rect.top -= offset.y;
+        dst_rect.bottom -=offset.y;
+        dst_rect.top += This->currentDesc.Height - h;
+        dst_rect.bottom += This->currentDesc.Height - h;
+    }
+
     device->blitter->set_shader((IWineD3DDevice *) device, This);
 
     ENTER_GL();




More information about the wine-cvs mailing list