From ddf7d9970244385eaba19f60c76deeab3f507c29 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 15 May 2012 21:15:13 +0300 Subject: Reset joystick repeat if button was pressed. --- src/joystick.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3-60-g2f50