Attempt to fix game freezing on windows when moving game window

This commit is contained in:
indev authored and Alug committed 2025-05-01 00:33:02 +02:00
1 parent 0ab0ced3d3
commit 2ddb1ab56c
1 file changed
+9
+9
View File
@@ -1201,6 +1201,11 @@ void I_GetEvent(void)
{
case SDL_WINDOWEVENT:
Impl_HandleWindowEvent(evt.window);
#ifdef _WIN32
// Hack: on windows, when moving game window, sdl gets stuck handling those events, which may cause timeouts in netgames
if (evt.window == SDL_WINDOWEVENT_MOVED || evt.window == SDL_WINDOWEVENT_RESIZED || evt.window == SDL_WINDOWEVENT_SIZE_CHANGED)
goto exitpoolevent;
#endif
break;
case SDL_KEYUP:
case SDL_KEYDOWN:
@@ -1388,6 +1393,10 @@ void I_GetEvent(void)
}
}
#ifdef _WIN32
exitpoolevent:
#endif
// Send all relative mouse movement as one single mouse event.
if (mousemovex || mousemovey)
{