From f3540c9eb7921f14f4e2b7b761124f1268fe61a9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 30 Jul 2003 01:59:11 +0000 Subject: [PATCH] You had it right the first time, almost. :) It's better to put hacks in the file they're affecting, rather than global handlers like ScreenManager. The problem you were having is that you were sending the "start fade out" message; when skipping a screen, you want to skip to "load next screen" and not fade out. It's OK to load the screen itself when you're skipping it, since that doesn't take time as long as you don't load the components. Note that this is how eg. ScreenInstructions and ScreenWarning work. --- stepmania/src/ScreenManager.cpp | 4 ---- stepmania/src/ScreenUnlock.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index dfde80f42f..f4322ba5ad 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -474,10 +474,6 @@ void ScreenManager::SetNewScreen( CString sClassName ) { m_DelayedScreen = sClassName; - // bypass unlock screen if unlocks aren't being used - if (sClassName == "ScreenUnlock" && !PREFSMAN->m_bUseUnlockSystem) - m_DelayedScreen = THEME->GetMetric("ScreenUnlock","NextScreen"); - /* If we're not delaying screen loads, load it now. Otherwise, we'll load * it on the next iteration. Only delay if we already have a screen * loaded; otherwise, there's no reason to delay. */ diff --git a/stepmania/src/ScreenUnlock.cpp b/stepmania/src/ScreenUnlock.cpp index 3768ed3b4e..c12112ddea 100644 --- a/stepmania/src/ScreenUnlock.cpp +++ b/stepmania/src/ScreenUnlock.cpp @@ -41,6 +41,13 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") { LOG->Trace("ScreenUnlock::ScreenUnlock()"); + + if (!PREFSMAN->m_bUseUnlockSystem) + { + this->HandleScreenMessage( SM_GoToNextScreen ); + return; + } + PointsUntilNextUnlock.LoadFromFont( THEME->GetPathToF("Common normal") ); PointsUntilNextUnlock.SetHorizAlign( Actor::align_left );