Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFire01 committed Sep 16, 2023
1 parent 7cbca9a commit 275f75b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dll/directx/wine/ddraw/ddraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 275f75b

Please sign in to comment.