summaryrefslogtreecommitdiff
path: root/src/eventsmanager.cpp
diff options
context:
space:
mode:
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);