diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 1979f828c5..d8da1b6684 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -165,15 +165,32 @@ void ScreenManager::Update( float fDeltaTime ) m_bZeroNextUpdate = false; } - // Only update the topmost screen on the stack. - if( pScreen ) - pScreen->Update( fDeltaTime ); + // + // Update screens. + // + { + // Only update the topmost screen on the stack. + if( pScreen ) + pScreen->Update( fDeltaTime ); - m_pSharedBGA->Update( fDeltaTime ); + m_pSharedBGA->Update( fDeltaTime ); + + for( unsigned i=0; iUpdate( fDeltaTime ); + } + // + // Handle messages after updating. + // + { + for( unsigned i=0; iProcessMessages( fDeltaTime ); + + m_pSharedBGA->ProcessMessages( fDeltaTime ); + + for( unsigned i=0; iProcessMessages( fDeltaTime ); + } - for( unsigned i=0; iUpdate( fDeltaTime ); - /* The music may be started on the first update. If we're reading from a CD, * it might not start immediately. Make sure we start playing the sound before * continuing, since it's strange to start rendering before the music starts. */