From 3dbf16a1ae89cbb423308b985c4f278acb42a22d Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 26 Jun 2004 22:28:25 +0000 Subject: [PATCH] fix "BackInEventMode works even when not set to EventMode" change BackInEventMode to use normal MenuBack behavior --- stepmania/src/ScreenManager.cpp | 7 ------- stepmania/src/StepMania.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 39777c06b5..17994b4da8 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -472,13 +472,6 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type // LOG->Trace( "ScreenManager::Input( %d-%d, %d-%d, %d-%d, %d-%d )", // DeviceI.device, DeviceI.button, GameI.controller, GameI.button, MenuI.player, MenuI.button, StyleI.player, StyleI.col ); - // check back in event mode - if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_BACK_IN_EVENT_MODE) ) - { - ResetGame( true ); - return; - } - // pass input only to topmost state if( !m_ScreenStack.empty() ) m_ScreenStack.back()->Input( DeviceI, type, GameI, MenuI, StyleI ); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index f9a5c297cf..a76381b999 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1421,6 +1421,14 @@ static void HandleInputEvents(float fDeltaTime) if( HandleGlobalInputs(DeviceI, type, GameI, MenuI, StyleI ) ) continue; // skip + // check back in event mode + if( PREFSMAN->m_bEventMode && + CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_BACK_IN_EVENT_MODE) ) + { + MenuI.player = PLAYER_1; + MenuI.button = MENU_BUTTON_BACK; + } + SCREENMAN->Input( DeviceI, type, GameI, MenuI, StyleI ); } }