From 506d6d91aa849f994c4bda2d3062d114629b2994 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 16 Mar 2007 22:28:55 +0000 Subject: [PATCH] semi-experimental: When a GameButton is pressed, stop repeating other keys on the same controller. --- stepmania/src/StepMania.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 7eb1b744bc..a028999096 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1381,6 +1381,16 @@ void HandleInputEvents(float fDeltaTime) INPUTQUEUE->RememberInput( input ); + /* When a GameButton is pressed, stop repeating other keys on the same controller. */ + if( input.type == IET_FIRST_PRESS && input.MenuI != GameButton_Invalid ) + { + FOREACH_GameButton( m ) + { + if( input.MenuI != m ) + INPUTMAPPER->RepeatStopKey( m, input.pn ); + } + } + if( HandleGlobalInputs(input) ) continue; // skip