diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 984fa9237b..ea0f43dd76 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -11,6 +11,7 @@ ________________________________________________________________________________ RandomBGStartBeat sets the beat of the music the first random bg occurs on. RandomBGChangeMeasures sets the number of measures between changes. RandomBGChangesWhenBPMChangesAtMeasureStart toggles the behavior in its name. + RandomBGEndsAtLastBeat toggles the behavior in its name. ================================================================================ StepMania 5.0.9 | 20150520 diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 70a84ba844..543838e476 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -242,6 +242,7 @@ BottomEdge=SCREEN_BOTTOM RandomBGStartBeat=-1000 RandomBGChangeMeasures=4 RandomBGChangesWhenBPMChangesAtMeasureStart=true +RandomBGEndsAtLastBeat=false [Banner] # Scroll stuff when you roll over it, DDR Extreme style. diff --git a/src/Background.cpp b/src/Background.cpp index dfbc56a469..af8ce9dc02 100644 --- a/src/Background.cpp +++ b/src/Background.cpp @@ -34,6 +34,7 @@ static ThemeMetric USE_STATIC_BG ("Background","UseStaticBackground"); static ThemeMetric RAND_BG_START_BEAT("Background", "RandomBGStartBeat"); static ThemeMetric RAND_BG_CHANGE_MEASURES("Background", "RandomBGChangeMeasures"); static ThemeMetric RAND_BG_CHANGES_WHEN_BPM_CHANGES("Background", "RandomBGChangesWhenBPMChangesAtMeasureStart"); +static ThemeMetric RAND_BG_ENDS_AT_LAST_BEAT("Background", "RandomBGEndsAtLastBeat"); static Preference g_bShowDanger( "ShowDanger", true ); @@ -613,11 +614,14 @@ void BackgroundImpl::LoadFromSong( const Song* pSong ) LoadFromRandom( firstBeat, lastBeat, BackgroundChange() ); - // end showing the static song background - BackgroundChange change; - change.m_def = m_StaticBackgroundDef; - change.m_fStartBeat = lastBeat; - layer.m_aBGChanges.push_back( change ); + if(RAND_BG_ENDS_AT_LAST_BEAT) + { + // end showing the static song background + BackgroundChange change; + change.m_def = m_StaticBackgroundDef; + change.m_fStartBeat = lastBeat; + layer.m_aBGChanges.push_back( change ); + } } // sort segments