Skip to content

Commit

Permalink
improve "fixnotresponding" patch
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 11, 2024
1 parent cd021dc commit cbecc7e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/ddsurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cbecc7e

Please sign in to comment.