diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-28 21:37:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-28 21:37:19 +0300 |
commit | 03bfe2db420e0b219451590e14bb34c03c71f03c (patch) | |
tree | c3cb081449261b51f1ffefa2da4ba39fa5645888 /src/joystick.cpp | |
parent | c47ef8b3f2ec6ea0e26748af17cb12b7f9cd20c9 (diff) | |
download | plus-03bfe2db420e0b219451590e14bb34c03c71f03c.tar.gz plus-03bfe2db420e0b219451590e14bb34c03c71f03c.tar.bz2 plus-03bfe2db420e0b219451590e14bb34c03c71f03c.tar.xz plus-03bfe2db420e0b219451590e14bb34c03c71f03c.zip |
improve some other files.
Diffstat (limited to 'src/joystick.cpp')
-rw-r--r-- | src/joystick.cpp | 7 |
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]) |