1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

enforce minimum window size on restore after maximize

This commit is contained in:
FunkyFr3sh 2024-10-05 23:00:13 +02:00
parent 552c5809e0
commit 4af2daed14

View File

@ -500,6 +500,14 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
g_config.window_rect.bottom = height;
dd_SetDisplayMode(0, 0, 0, 0);
if (width < g_ddraw.width || height < g_ddraw.height)
{
/* Can't enforce minimum window size in linux because there is no WM_SIZING and
WM_GETMINMAXINFO is ignored for whatever reasons */
SetTimer(g_ddraw.hwnd, IDT_TIMER_LINUX_FIX_WINDOW_SIZE, 1000, (TIMERPROC)NULL);
}
}
}
}