summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-15 21:15:13 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-15 21:15:13 +0300
commitddf7d9970244385eaba19f60c76deeab3f507c29 (patch)
treef35c6705dfaeb74af6a3f6ff04c6275b5fd32e8a /src
parentbbb587c352d48d4774133b56ce4c7f9bfd77c1e7 (diff)
downloadmv-ddf7d9970244385eaba19f60c76deeab3f507c29.tar.gz
mv-ddf7d9970244385eaba19f60c76deeab3f507c29.tar.bz2
mv-ddf7d9970244385eaba19f60c76deeab3f507c29.tar.xz
mv-ddf7d9970244385eaba19f60c76deeab3f507c29.zip
Reset joystick repeat if button was pressed.
Diffstat (limited to 'src')
-rw-r--r--src/joystick.cpp2
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);