diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 368cff3479..074875388b 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -33,6 +33,8 @@ static ThemeMetric BLINK_DANGER_ALL ("Background","BlinkDangerAll"); static ThemeMetric DANGER_ALL_IS_OPAQUE ("Background","DangerAllIsOpaque"); static ThemeMetric CLAMP_OUTPUT_PERCENT ("Background","ClampOutputPercent"); +static Preference g_bShowDanger( "ShowDanger", true ); + // Width of the region separating the left and right brightness areas: static float g_fBackgroundCenterWidth = 40; @@ -849,7 +851,7 @@ void BackgroundImpl::Update( float fDeltaTime ) FOREACH_PlayerNumber( p ) { - if( PREFSMAN->m_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) ) + if( g_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) ) m_DangerPlayer[p]->Update( fDeltaTime ); if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) ) @@ -910,7 +912,7 @@ void BackgroundImpl::DrawPrimitives() FOREACH_PlayerNumber( p ) { - if( PREFSMAN->m_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) ) + if( g_bShowDanger && GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) ) m_DangerPlayer[p]->Draw(); if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) ) m_DeadPlayer[p]->Draw(); @@ -934,7 +936,7 @@ bool BackgroundImpl::IsDangerAllVisible() FOREACH_PlayerNumber( p ) if( GAMESTATE->GetPlayerFailType(GAMESTATE->m_pPlayerState[p]) == SongOptions::FAIL_OFF ) return false; - if( !PREFSMAN->m_bShowDanger ) + if( !g_bShowDanger ) return false; /* Don't show it if everyone is already failing: it's already too late and it's diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index d1a338f28c..587f470d80 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -288,7 +288,6 @@ PrefsManager::PrefsManager() : m_bOnlyDedicatedMenuButtons ( "OnlyDedicatedMenuButtons", false ), m_bMenuTimer ( "MenuTimer", true ), - m_bShowDanger ( "ShowDanger", true ), m_fTimingWindowScale ( "TimingWindowScale", 1.0f ), m_fTimingWindowAdd ( "TimingWindowAdd", 0 ), diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 251ff9996d..95b89f3751 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -129,7 +129,6 @@ public: Preference m_bOnlyDedicatedMenuButtons; Preference m_bMenuTimer; - Preference m_bShowDanger; Preference m_fTimingWindowScale; Preference m_fTimingWindowAdd; // this is useful for compensating for changes in sampling rate between devices