summaryrefslogtreecommitdiff
path: root/src/joystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/joystick.cpp')
-rw-r--r--src/joystick.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/joystick.cpp b/src/joystick.cpp
index 42dd14bd1..1e5d5e5f9 100644
--- a/src/joystick.cpp
+++ b/src/joystick.cpp
@@ -80,7 +80,7 @@ bool Joystick::open()
mNumber = joystickCount - 1;
if (mNumber < 0)
{
- logger->log("error: incorrect joystick selection");
+ logger->log1("error: incorrect joystick selection");
return false;
}
logger->log("open joystick %d", mNumber);
@@ -312,9 +312,10 @@ bool Joystick::isActionActive(const int index) const
const KeyFunction &key = inputManager.getKey(index);
for (size_t i = 0; i < KeyFunctionSize; i ++)
{
- if (key.values[i].type != INPUT_JOYSTICK)
+ const KeyItem &val = key.values[i];
+ if (val.type != INPUT_JOYSTICK)
continue;
- const int value = key.values[i].value;
+ const int value = val.value;
if (value >= 0 && value < mButtonsNumber)
{
if (mActiveButtons[value])