summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp4
-rw-r--r--src/game.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index e434f23e9..cb0b6b982 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -946,7 +946,11 @@ int Client::gameExec()
{
BLOCK_START("Client::gameExec 2")
// Handle SDL events
+#ifdef USE_SDL2
+ while (SDL_WaitEventTimeout(&event, 0))
+#else
while (SDL_PollEvent(&event))
+#endif
{
if (mLogInput)
logEvent(event);
diff --git a/src/game.cpp b/src/game.cpp
index 4eaa09a66..ffcdeb934 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1009,7 +1009,11 @@ void Game::handleInput()
// Events
SDL_Event event;
+#ifdef USE_SDL2
+ while (SDL_WaitEventTimeout(&event, 0))
+#else
while (SDL_PollEvent(&event))
+#endif
{
BLOCK_START("Game::handleInput 2")
if (mLogInput)