diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-06 14:49:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-06 14:49:47 +0300 |
commit | c649cf883480071c9b93909c4ea4ee5ec98155b2 (patch) | |
tree | 71022fd2db59c643c19c78c5524ffcd038e35a7f /src/eventsmanager.cpp | |
parent | 4cab6fc78e19799f223d951d5ccc9afb303b65f2 (diff) | |
download | plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.gz plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.bz2 plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.tar.xz plus-c649cf883480071c9b93909c4ea4ee5ec98155b2.zip |
Remove some duplicate code.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r-- | src/eventsmanager.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 73f7ef203..a87b1fd1d 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -23,11 +23,9 @@ #include "configuration.h" #include "client.h" #include "game.h" -#ifdef USE_SDL2 -#include "render/graphics.h" -#endif #include "logger.h" #include "mumblemanager.h" +#include "sdlshared.h" #include "settings.h" #include "gui/windowmanager.h" @@ -36,6 +34,10 @@ #include "input/inputmanager.h" +#ifdef USE_SDL2 +#include "render/graphics.h" +#endif + #include "utils/process.h" #include "debug.h" @@ -115,13 +117,8 @@ bool EventsManager::handleEvents() const else { SDL_Event event; - // Handle SDL events -#ifdef USE_SDL2 while (SDL_WaitEventTimeout(&event, 0)) -#else - while (SDL_PollEvent(&event)) -#endif { if (!handleCommonEvents(event)) { @@ -168,11 +165,7 @@ void EventsManager::handleGameEvents() const // Events SDL_Event event; -#ifdef USE_SDL2 while (SDL_WaitEventTimeout(&event, 0)) -#else - while (SDL_PollEvent(&event)) -#endif { if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) game->updateHistory(event); |