From 275f75b30b3aea034902311020e284e5e3f03208 Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sat, 16 Sep 2023 12:46:25 -0700 Subject: [PATCH] hmm --- dll/directx/wine/ddraw/ddraw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dll/directx/wine/ddraw/ddraw.c b/dll/directx/wine/ddraw/ddraw.c index e5acf2caff5ac..b70b69ee3c50f 100644 --- a/dll/directx/wine/ddraw/ddraw.c +++ b/dll/directx/wine/ddraw/ddraw.c @@ -1132,6 +1132,7 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW /* TODO: The possible return values from msdn suggest that the screen mode * can't be changed if a surface is locked or some drawing is in progress. */ + if (SUCCEEDED(hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode))) { if (ddraw->primary) @@ -1145,6 +1146,10 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW ddrawformat_from_wined3dformat(&ddraw->primary->surface_desc.u4.ddpfPixelFormat, mode.format_id); } ddraw->flags |= DDRAW_RESTORE_MODE; + + if (ddraw->cooperative_level & DDSCL_EXCLUSIVE) + SetWindowPos(ddraw->dest_window, HWND_TOP, 0, 0, width, height, SWP_SHOWWINDOW | SWP_NOACTIVATE); + TRACE("DirectDraw window has been resized\n"); } InterlockedCompareExchange(&ddraw->device_state, DDRAW_DEVICE_STATE_NOT_RESTORED, DDRAW_DEVICE_STATE_OK);