From 3bd57f9ad1e0003622a478aee1feabc29e405423 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 13 Aug 2019 10:02:32 +0200 Subject: [PATCH] add workaround for non responding window in cnc games --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index e993971..18152b3 100644 --- a/src/main.c +++ b/src/main.c @@ -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));