diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-08 19:38:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-08 19:38:59 +0300 |
commit | f1e48fffe3c224ee81cdc1f85dbd0179b202d457 (patch) | |
tree | a180b55377204e85c52a4accf35ecc964f2d2cca /src/eventsmanager.cpp | |
parent | 29557a45208b1576e293427090360f6d794ea6b3 (diff) | |
download | manaverse-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.tar.gz manaverse-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.tar.bz2 manaverse-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.tar.xz manaverse-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.zip |
Split SDL_WaitEventTimeout/SDL_PollEvent into lower level SDL function calls.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r-- | src/eventsmanager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 2db3e8869..efd300f9c 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -44,6 +44,7 @@ #endif // USE_SDL2 #include "utils/process.h" +#include "utils/sdlhelper.h" #include "debug.h" @@ -137,7 +138,7 @@ bool EventsManager::handleEvents() const { SDL_Event event; // Handle SDL events - while (SDL_WaitEventTimeout(&event, 0)) + while (SDL::PollEvent(&event)) { if (!handleCommonEvents(event)) { @@ -187,7 +188,7 @@ void EventsManager::handleGameEvents() const // Events SDL_Event event; - while (SDL_WaitEventTimeout(&event, 0)) + while (SDL::PollEvent(&event)) { if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) game->updateHistory(event); |