diff options
Diffstat (limited to 'src/joystick.cpp')
-rw-r--r-- | src/joystick.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/joystick.cpp b/src/joystick.cpp index f440c61f..9864a12b 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -61,11 +61,11 @@ Joystick::Joystick(int no): logger->log("Hats: %i", SDL_JoystickNumHats(mJoystick)); logger->log("Buttons: %i", SDL_JoystickNumButtons(mJoystick)); - mEnabled = (int) config.getValue("joystickEnabled", 0) != 0; - mUpTolerance = (int) config.getValue("upTolerance", 100); - mDownTolerance = (int) config.getValue("downTolerance", 100); - mLeftTolerance = (int) config.getValue("leftTolerance", 100); - mRightTolerance = (int) config.getValue("rightTolerance", 100); + mEnabled = config.getBoolValue("joystickEnabled"); + mUpTolerance = config.getIntValue("upTolerance"); + mDownTolerance = config.getIntValue("downTolerance"); + mLeftTolerance = config.getIntValue("leftTolerance"); + mRightTolerance = config.getIntValue("rightTolerance"); } Joystick::~Joystick() |