summaryrefslogtreecommitdiff
path: root/src/input/joystick.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-30 12:46:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-30 12:46:49 +0300
commit9bb11133522836a9c5e251550ac88c9a4e091c0e (patch)
treef65703ac1a51b79a0766c48420769d28d0847f41 /src/input/joystick.cpp
parente55ed9a138e97f6fba5e3b6858a755f8a50197d2 (diff)
downloadmanaverse-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.gz
manaverse-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.bz2
manaverse-9bb11133522836a9c5e251550ac88c9a4e091c0e.tar.xz
manaverse-9bb11133522836a9c5e251550ac88c9a4e091c0e.zip
Move main window related code into windowmanager.
Diffstat (limited to 'src/input/joystick.cpp')
-rw-r--r--src/input/joystick.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index c9f2a85e7..626321c69 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -25,8 +25,11 @@
#include "client.h"
#include "configuration.h"
#include "logger.h"
+#include "settings.h"
#include "sdlshared.h"
+#include "gui/windowmanager.h"
+
#include "input/inputmanager.h"
#include "input/inputtype.h"
@@ -169,7 +172,7 @@ void Joystick::logic()
mDirection = 0;
- if (mUseInactive || client->getInputFocused())
+ if (mUseInactive || settings.inputFocused)
{
// X-Axis
int position = SDL_JoystickGetAxis(mJoystick, 0);
@@ -338,7 +341,7 @@ bool Joystick::validate() const
if (mCalibrating || !mEnabled || !mCalibrated)
return false;
- return (mUseInactive || client->getInputFocused());
+ return (mUseInactive || settings.inputFocused);
}
void Joystick::handleRepeat(const int time)