diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-15 21:15:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-15 21:15:13 +0300 |
commit | ddf7d9970244385eaba19f60c76deeab3f507c29 (patch) | |
tree | f35c6705dfaeb74af6a3f6ff04c6275b5fd32e8a | |
parent | bbb587c352d48d4774133b56ce4c7f9bfd77c1e7 (diff) | |
download | manaverse-ddf7d9970244385eaba19f60c76deeab3f507c29.tar.gz manaverse-ddf7d9970244385eaba19f60c76deeab3f507c29.tar.bz2 manaverse-ddf7d9970244385eaba19f60c76deeab3f507c29.tar.xz manaverse-ddf7d9970244385eaba19f60c76deeab3f507c29.zip |
Reset joystick repeat if button was pressed.
-rw-r--r-- | src/joystick.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/joystick.cpp b/src/joystick.cpp index 09d5c6226..cb3fa7fe1 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -196,6 +196,8 @@ void Joystick::logic() { const bool state = (SDL_JoystickGetButton(mJoystick, i) == 1); mActiveButtons[i] = state; + if (!state) + resetRepeat(i); #ifdef DEBUG_JOYSTICK if (mActiveButtons[i]) logger->log("button: %d", i); |