[PATCH 09/10] ddraw: Reset wined3d viewport on SetRenderTarget().

Matteo Bruni mbruni at codeweavers.com
Thu Mar 22 15:43:12 CDT 2018


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
Generally the viewport is explicitly set again immediately after the
SetRenderTarget() so you wouldn't notice the difference. The ddraw7
test_viewport() does a Clear() before that though and, without this
patch, it crashes in surface_cpu_blt_colour_fill() when switching from
the 1280x960 to the 320x240 RT.

I guess another option is to fix this in wined3d (instead OR in
addition to this).

 dlls/ddraw/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 38fcc00e6b6..6858a1bb645 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1818,7 +1818,7 @@ static HRESULT d3d_device_set_render_target(struct d3d_device *device,
     }
 
     if (FAILED(hr = wined3d_device_set_rendertarget_view(device->wined3d_device,
-            0, ddraw_surface_get_rendertarget_view(target), FALSE)))
+            0, ddraw_surface_get_rendertarget_view(target), TRUE)))
         return hr;
 
     IUnknown_AddRef(rt_iface);
-- 
2.13.6




More information about the wine-devel mailing list