From cbecc7e2cf61e080bcb352fec8b8fec725059abc Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Wed, 11 Sep 2024 16:59:21 +0200 Subject: [PATCH] improve "fixnotresponding" patch --- src/ddsurface.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ddsurface.c b/src/ddsurface.c index 121f8fbc9e..38a5d4850d 100644 --- a/src/ddsurface.c +++ b/src/ddsurface.c @@ -57,9 +57,13 @@ HRESULT dds_Blt( !IsWine()) { /* workaround for "Not Responding" window problem */ - g_ddraw.last_msg_pull_tick = timeGetTime(); + //g_ddraw.last_msg_pull_tick = timeGetTime(); MSG msg; - real_PeekMessageA(&msg, g_ddraw.hwnd, 0, 0, PM_NOREMOVE | PM_QS_INPUT); + if (real_PeekMessageA(&msg, g_ddraw.hwnd, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessageA(&msg); + } } if (g_ddraw.ref && @@ -1001,9 +1005,13 @@ HRESULT dds_Lock( !IsWine()) { /* workaround for "Not Responding" window problem */ - g_ddraw.last_msg_pull_tick = timeGetTime(); + //g_ddraw.last_msg_pull_tick = timeGetTime(); MSG msg; - real_PeekMessageA(&msg, g_ddraw.hwnd, 0, 0, PM_NOREMOVE | PM_QS_INPUT); + if (real_PeekMessageA(&msg, g_ddraw.hwnd, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessageA(&msg); + } } HRESULT ret = dds_GetSurfaceDesc(This, lpDDSurfaceDesc);