mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
#174 only send SWP_FRAMECHANGED when frame was actually changed
This commit is contained in:
parent
b609fadfb3
commit
b8e7c857ee
6
src/dd.c
6
src/dd.c
@ -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,
|
||||
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user