summaryrefslogtreecommitdiff
path: root/src/input/joystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/joystick.cpp')
-rw-r--r--src/input/joystick.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index 3e52d6ffe..7343ec00c 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -345,7 +345,6 @@ void Joystick::handleRepeat(const int time)
{
bool repeat(false);
const int key = (*it).first;
- int &keyTime = (*it).second;
if (key >= 0 && key < mButtonsNumber)
{
if (mActiveButtons[key])
@@ -353,6 +352,7 @@ void Joystick::handleRepeat(const int time)
}
if (repeat)
{
+ int &keyTime = (*it).second;
if (time > keyTime && abs(time - keyTime)
> SDL_DEFAULT_REPEAT_DELAY * 10)
{