summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-10 14:40:27 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-10 14:40:27 +0300
commit8dfb59db0b8df1b5b2640c37fa1fe0d87daf3735 (patch)
tree2c7a8b24ca6d0c9e714bfeea179d9d58a9126590 /src/game.cpp
parentdc17bee84d0499dcf009f6a13faa55daba99ae18 (diff)
downloadplus-8dfb59db0b8df1b5b2640c37fa1fe0d87daf3735.tar.gz
plus-8dfb59db0b8df1b5b2640c37fa1fe0d87daf3735.tar.bz2
plus-8dfb59db0b8df1b5b2640c37fa1fe0d87daf3735.tar.xz
plus-8dfb59db0b8df1b5b2640c37fa1fe0d87daf3735.zip
improve SDL2 handling events.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp4
1 files changed, 4 insertions, 0 deletions
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)