From 3460f79f54bc5832327a5af649740f518ec53639 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 30 Sep 2006 07:48:36 +0000 Subject: [PATCH] simplify --- stepmania/src/StepMania.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 18d89ce7a6..1e6fbaed80 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -761,7 +761,8 @@ void StepMania::ChangeCurrentGame( const Game* g ) GAMESTATE->SetCurGame( g ); /* Load keymaps for the new game. */ - INPUTMAPPER->ReadMappingsFromDisk(); + if( INPUTMAPPER ) + INPUTMAPPER->ReadMappingsFromDisk(); } static void ReadGamePrefsFromDisk() @@ -788,11 +789,7 @@ static void ReadGamePrefsFromDisk() if( !GAMEMAN->IsGameEnabled(pGame) ) RageException::Throw( "Default NoteSkin for \"%s\" missing", pGame->m_szName ); - GAMESTATE->SetCurGame( pGame ); - - /* Load keymaps for the new game. */ - if( INPUTMAPPER ) - INPUTMAPPER->ReadMappingsFromDisk(); + StepMania::ChangeCurrentGame( pGame ); RString sAnnouncer = PREFSMAN->m_sAnnouncer; RString sTheme = PREFSMAN->m_sTheme;