diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 9bc40e0a53..23e2584cfa 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,7 @@ _____________________________________________________________________________ -------- * [NotesLoaderKSF] Support reading of #PLAYER and #MUSICINTRO/#INTRO tags in KSF files. [based on code by Aldo_MX] +* Added --game= command line option. 20100626 -------- diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 4fddeb013a..560678dba6 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -1147,7 +1147,17 @@ int main(int argc, char* argv[]) INPUTFILTER = new InputFilter; INPUTMAPPER = new InputMapper; - StepMania::ChangeCurrentGame( GAMESTATE->GetCurrentGame() ); + // allow the player to pass in a gametype via command line. -aj + RString argGame; + const Game* g = GAMESTATE->GetCurrentGame(); + if( GetCommandlineArgument( "game",&argGame) ) + { + // we need to perform some conversion surgery + const Game* newG = GAMEMAN->StringToGame(argGame); + if(newG && newG != g) + g = newG; + } + StepMania::ChangeCurrentGame( g ); INPUTQUEUE = new InputQueue; SONGINDEX = new SongCacheIndex;