From f8c8a7852eb7b19658cbf4e92eefad14dff76561 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 5 Oct 2006 00:49:47 +0000 Subject: [PATCH] StepMania::ChangeCurrentGame calls ReadGamePrefsFromDisk; fixes theme not changed on game change --- stepmania/src/StepMania.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index fda01bf1d2..f099f144e2 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -754,20 +754,6 @@ RageDisplay *CreateDisplay() return pRet; } -void StepMania::ChangeCurrentGame( const Game* g ) -{ - ASSERT( g ); - - GAMESTATE->SetCurGame( g ); - - /* Load keymaps for the new game. */ - if( INPUTMAPPER ) - { - INPUTMAPPER->SetInputScheme( &g->m_InputScheme ); - INPUTMAPPER->ReadMappingsFromDisk(); - } -} - static void SwitchToLastPlayedGame() { ASSERT( GAMEMAN ); @@ -810,6 +796,21 @@ static void ReadGamePrefsFromDisk() THEME->SwitchThemeAndLanguage( sTheme, PREFSMAN->m_sLanguage, PREFSMAN->m_bPseudoLocalize ); } +void StepMania::ChangeCurrentGame( const Game* g ) +{ + ASSERT( g ); + + GAMESTATE->SetCurGame( g ); + + ReadGamePrefsFromDisk(); + + /* Load keymaps for the new game. */ + if( INPUTMAPPER ) + { + INPUTMAPPER->SetInputScheme( &g->m_InputScheme ); + INPUTMAPPER->ReadMappingsFromDisk(); + } +} static void MountTreeOfZips( const RString &dir ) {