summaryrefslogtreecommitdiff
path: root/src/gui/sdlinput.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-20 01:38:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-20 01:38:44 +0300
commitea4826bd3b81ace08b72c7e305aa0b1f89669110 (patch)
tree2c23cfaec2b8d44991b7c93adc70720782094958 /src/gui/sdlinput.cpp
parent81bd7930164b79a841b03e4a8a1937e5aeb3ab54 (diff)
downloadmanaplus-ea4826bd3b81ace08b72c7e305aa0b1f89669110.tar.gz
manaplus-ea4826bd3b81ace08b72c7e305aa0b1f89669110.tar.bz2
manaplus-ea4826bd3b81ace08b72c7e305aa0b1f89669110.tar.xz
manaplus-ea4826bd3b81ace08b72c7e305aa0b1f89669110.zip
Improve sdlinput.
Diffstat (limited to 'src/gui/sdlinput.cpp')
-rw-r--r--src/gui/sdlinput.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index c1e02e9b2..0bc23a849 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -98,11 +98,6 @@ SDLInput::SDLInput() :
{
}
-bool SDLInput::isKeyQueueEmpty() const
-{
- return mKeyInputQueue.empty();
-}
-
KeyInput SDLInput::dequeueKeyInput()
{
if (mKeyInputQueue.empty())
@@ -114,11 +109,6 @@ KeyInput SDLInput::dequeueKeyInput()
return keyInput;
}
-bool SDLInput::isMouseQueueEmpty() const
-{
- return mMouseInputQueue.empty();
-}
-
MouseInput SDLInput::dequeueMouseInput()
{
MouseInput mouseInput;
@@ -165,7 +155,6 @@ void SDLInput::pushInput(const SDL_Event &event)
case SDL_MOUSEWHEEL:
{
-// const int x = event.wheel.x;
const int y = event.wheel.y;
if (y)
{
@@ -273,8 +262,7 @@ void SDLInput::pushInput(const SDL_Event &event)
* This occurs when the mouse leaves the window and the Gui-chan
* application loses its mousefocus.
*/
- if ((event.active.state & SDL_APPMOUSEFOCUS)
- && !event.active.gain)
+ if ((event.active.state & SDL_APPMOUSEFOCUS) && !event.active.gain)
{
mMouseInWindow = false;
@@ -288,11 +276,8 @@ void SDLInput::pushInput(const SDL_Event &event)
}
}
- if ((event.active.state & SDL_APPMOUSEFOCUS)
- && event.active.gain)
- {
+ if ((event.active.state & SDL_APPMOUSEFOCUS) && event.active.gain)
mMouseInWindow = true;
- }
break;
#endif
default: