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

add workaround for non responding window in cnc games

This commit is contained in:
FunkyFr3sh 2019-08-13 10:02:32 +02:00
parent c2701f0d18
commit 3bd57f9ad1

View File

@ -875,6 +875,9 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
if (This->windowed)
{
MSG msg; // workaround for "Not Responding" window problem in cnc games
PeekMessage(&msg, ddraw->hWnd, 0, 0, PM_NOREMOVE);
if (!This->border)
{
real_SetWindowLongA(This->hWnd, GWL_STYLE, GetWindowLong(This->hWnd, GWL_STYLE) & ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU));