diff options
Diffstat (limited to 'src/gui/sdlinput.cpp')
-rw-r--r-- | src/gui/sdlinput.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index c81f11802..661be07c5 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -90,8 +90,6 @@ #include <SDL_keyboard.h> #include <SDL_timer.h> -#include "gui/base/exception.hpp" - SDLInput::SDLInput() : mKeyInputQueue(), mMouseInputQueue(), @@ -108,9 +106,7 @@ bool SDLInput::isKeyQueueEmpty() KeyInput SDLInput::dequeueKeyInput2() { if (mKeyInputQueue.empty()) - { - throw GCN_EXCEPTION("The queue is empty."); - } + return KeyInput(); KeyInput keyInput = mKeyInputQueue.front(); mKeyInputQueue.pop(); @@ -128,7 +124,7 @@ gcn::MouseInput SDLInput::dequeueMouseInput() gcn::MouseInput mouseInput; if (mMouseInputQueue.empty()) - throw GCN_EXCEPTION("The queue is empty."); + return MouseInput(); mouseInput = mMouseInputQueue.front(); mMouseInputQueue.pop(); @@ -141,7 +137,7 @@ MouseInput SDLInput::dequeueMouseInput2() MouseInput mouseInput; if (mMouseInputQueue.empty()) - throw GCN_EXCEPTION("The queue is empty."); + return MouseInput(); mouseInput = mMouseInputQueue.front(); mMouseInputQueue.pop(); |