From 03bfe2db420e0b219451590e14bb34c03c71f03c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 28 Feb 2013 21:37:19 +0300 Subject: improve some other files. --- src/joystick.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/joystick.cpp') 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]) -- cgit v1.2.3-70-g09d2