From ddf7d9970244385eaba19f60c76deeab3f507c29 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
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(+)

(limited to 'src')

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-70-g09d2