diff --git a/stepmania/src/Screen.h b/stepmania/src/Screen.h index 65901a7ec2..c3fcf7adc7 100644 --- a/stepmania/src/Screen.h +++ b/stepmania/src/Screen.h @@ -45,6 +45,9 @@ public: /* This is called immediately before the screen is used. */ virtual void BeginScreen(); + /* This is called when the screen is popped. */ + virtual void EndScreen() { } + virtual void Update( float fDeltaTime ); virtual bool OverlayInput( const InputEventPlus &input ); virtual void Input( const InputEventPlus &input ); diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 7f87424af0..9d2bda96ef 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -323,6 +323,7 @@ ScreenMessage ScreenManager::PopTopScreenInternal( bool bSendLoseFocus ) if( bSendLoseFocus ) ls.m_pScreen->HandleScreenMessage( SM_LoseFocus ); + ls.m_pScreen->EndScreen(); if( g_setPersistantScreens.find(ls.m_pScreen->GetName()) != g_setPersistantScreens.end() ) {