From bbb416d615c42c3cbd8db0ecb1bc4fc2482963b8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 17 Mar 2003 04:56:47 +0000 Subject: [PATCH] re-sync messages, so the jukebox continues at end of song fix assert failure --- stepmania/src/ScreenDemonstration.cpp | 2 +- stepmania/src/ScreenJukebox.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 2b80803b8a..1fdec0094e 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -23,7 +23,7 @@ #define NEXT_SCREEN THEME->GetMetric("ScreenDemonstration","NextScreen") -const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+101); // MUST be same as in ScreenGameplay +const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be same as in ScreenGameplay bool PrepareForDemonstration() // always return true. diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index decefdc1fb..ddd77cd75f 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -20,7 +20,7 @@ -const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+101); // MUST be same as in ScreenGameplay +const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be same as in ScreenGameplay bool PrepareForJukebox() // always return true. @@ -155,6 +155,8 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type { //LOG->Trace( "ScreenJukebox::Input()" ); + if( type != IET_FIRST_PRESS ) + return; /* ignore */ if( MenuI.IsValid() ) { @@ -196,8 +198,8 @@ void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM ) switch( SM ) { case SM_NotesEnded: - if( m_Out.IsTransitioning() ) - return; // ignore - we're already fading + if( m_Out.IsTransitioning() || m_Out.IsFinished() ) + return; // ignore - we're already fading or faded m_Out.StartTransitioning( SM_GoToNextScreen ); return; case SM_GoToNextScreen: