From d5207e1b309f424bf18a19df15fd006a25b5a719 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Tue, 29 Jul 2003 06:43:19 +0000 Subject: [PATCH] much cleaner transition to skip screenunlock if unlocks are off --- stepmania/src/ScreenManager.cpp | 4 ++++ stepmania/src/ScreenUnlock.cpp | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index f4322ba5ad..dfde80f42f 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -474,6 +474,10 @@ 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 3119cc78c7..3768ed3b4e 100644 --- a/stepmania/src/ScreenUnlock.cpp +++ b/stepmania/src/ScreenUnlock.cpp @@ -40,15 +40,6 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") { - // DIRTY HACK: bypass unlocks screen if unlocks are off - // (theres probably a more efficient way but i've yet to figure what it is) - if (!PREFSMAN->m_bUseUnlockSystem) - { - this->ClearMessageQueue( SM_BeginFadingOut ); // ignore ScreenAttract's SecsToShow - this->PostScreenMessage( SM_BeginFadingOut, 0 ); - return; - } - LOG->Trace("ScreenUnlock::ScreenUnlock()"); PointsUntilNextUnlock.LoadFromFont( THEME->GetPathToF("Common normal") ); PointsUntilNextUnlock.SetHorizAlign( Actor::align_left ); @@ -335,4 +326,3 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") this->PostScreenMessage( SM_BeginFadingOut, TIME_TO_DISPLAY ); } -