[PATCH 1/8] ddraw: Pass non-NULL rectangles to wined3d_surface_blt() in ddraw_surface_update_frontbuffer().

Henri Verbeet hverbeet at codeweavers.com
Wed Jan 27 13:44:34 CST 2016


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/ddraw/surface.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index b4fa5de..d4a25c6 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -46,22 +46,19 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
     int x, y, w, h;
     HRESULT hr;
     BOOL ret;
+    RECT r;
 
     if (!rect)
     {
-        x = 0;
-        y = 0;
-        w = surface->surface_desc.dwWidth;
-        h = surface->surface_desc.dwHeight;
-    }
-    else
-    {
-        x = rect->left;
-        y = rect->top;
-        w = rect->right - rect->left;
-        h = rect->bottom - rect->top;
+        SetRect(&r, 0, 0, surface->surface_desc.dwWidth, surface->surface_desc.dwHeight);
+        rect = &r;
     }
 
+    x = rect->left;
+    y = rect->top;
+    w = rect->right - rect->left;
+    h = rect->bottom - rect->top;
+
     if (w <= 0 || h <= 0)
         return DD_OK;
 
-- 
2.1.4




More information about the wine-patches mailing list