summaryrefslogtreecommitdiff
path: root/src/joystick.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-28 21:37:19 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-28 21:37:19 +0300
commit03bfe2db420e0b219451590e14bb34c03c71f03c (patch)
treec3cb081449261b51f1ffefa2da4ba39fa5645888 /src/joystick.cpp
parentc47ef8b3f2ec6ea0e26748af17cb12b7f9cd20c9 (diff)
downloadManaVerse-03bfe2db420e0b219451590e14bb34c03c71f03c.tar.gz
ManaVerse-03bfe2db420e0b219451590e14bb34c03c71f03c.tar.bz2
ManaVerse-03bfe2db420e0b219451590e14bb34c03c71f03c.tar.xz
ManaVerse-03bfe2db420e0b219451590e14bb34c03c71f03c.zip
improve some other files.
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])