Skip to content

Commit

Permalink
#174 only send SWP_FRAMECHANGED when frame was actually changed
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 28, 2022
1 parent b609fad commit b8e7c85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,12 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
{
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);

DWORD swp_flags = SWP_SHOWWINDOW;

if ((style & WS_CAPTION))
{
swp_flags |= SWP_FRAMECHANGED;

real_SetWindowLongA(
g_ddraw->hwnd,
GWL_STYLE,
Expand Down Expand Up @@ -783,7 +787,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
0,
g_ddraw->render.width,
g_ddraw->render.height,
SWP_SHOWWINDOW | SWP_FRAMECHANGED);
swp_flags);

g_ddraw->last_set_window_pos_tick = timeGetTime();

Expand Down

0 comments on commit b8e7c85

Please sign in to comment.