summaryrefslogtreecommitdiff
path: root/src/eventsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-08 19:38:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-08 19:38:59 +0300
commitf1e48fffe3c224ee81cdc1f85dbd0179b202d457 (patch)
treea180b55377204e85c52a4accf35ecc964f2d2cca /src/eventsmanager.cpp
parent29557a45208b1576e293427090360f6d794ea6b3 (diff)
downloadplus-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.tar.gz
plus-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.tar.bz2
plus-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.tar.xz
plus-f1e48fffe3c224ee81cdc1f85dbd0179b202d457.zip
Split SDL_WaitEventTimeout/SDL_PollEvent into lower level SDL function calls.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r--src/eventsmanager.cpp5
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);