Rémi Bernon : d3d9: Use WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE if extended.

Alexandre Julliard julliard at winehq.org
Tue Jul 7 15:47:08 CDT 2020


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Wed Jul  8 00:01:16 2020 +0430

d3d9: Use WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE if extended.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d9/device.c       |  2 ++
 dlls/d3d9/tests/d3d9ex.c | 12 ++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 0cf9677c97..b92193d46f 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -349,6 +349,8 @@ static BOOL wined3d_swapchain_desc_from_d3d9(struct wined3d_swapchain_desc *swap
             = wined3dformat_from_d3dformat(present_parameters->AutoDepthStencilFormat);
     swapchain_desc->flags
             = (present_parameters->Flags & D3DPRESENTFLAGS_MASK) | WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH;
+    if (extended)
+        swapchain_desc->flags |= WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE;
     if ((present_parameters->Flags & D3DPRESENTFLAG_LOCKABLE_BACKBUFFER)
             && (is_gdi_compat_wined3dformat(swapchain_desc->backbuffer_format)
             /* WINED3DFMT_UNKNOWN creates the swapchain with the current
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c
index 2836fdd5be..97db3d445c 100644
--- a/dlls/d3d9/tests/d3d9ex.c
+++ b/dlls/d3d9/tests/d3d9ex.c
@@ -3569,12 +3569,10 @@ static void test_window_style(void)
 
         style = GetWindowLongA(device_window, GWL_STYLE);
         expected_style = device_style;
-        todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES))
-            ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
-                    expected_style, style, i);
+        ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
+                expected_style, style, i);
         style = GetWindowLongA(device_window, GWL_EXSTYLE);
         expected_style = device_exstyle;
-        todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES))
         ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n",
                 expected_style, style, i);
 
@@ -3590,12 +3588,10 @@ static void test_window_style(void)
 
         style = GetWindowLongA(device_window, GWL_STYLE);
         expected_style = device_style;
-        todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES))
-            ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
-                    expected_style, style, i);
+        ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
+                expected_style, style, i);
         style = GetWindowLongA(device_window, GWL_EXSTYLE);
         expected_style = device_exstyle;
-        todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES))
         ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n",
                 expected_style, style, i);
 




More information about the wine-cvs mailing list