diff --git a/desmume/src/commandline.cpp b/desmume/src/commandline.cpp index d67539911..c49f238f4 100644 --- a/desmume/src/commandline.cpp +++ b/desmume/src/commandline.cpp @@ -34,6 +34,7 @@ CommandLine::CommandLine() { load_slot = 0; arm9_gdb_port = arm7_gdb_port = 0; + start_paused = FALSE; } CommandLine::~CommandLine() @@ -55,6 +56,7 @@ void CommandLine::loadCommonOptions() { "load-slot", 0, 0, G_OPTION_ARG_INT, &load_slot, "Loads savegame from slot NUM", "NUM"}, { "play-movie", 0, 0, G_OPTION_ARG_FILENAME, &_play_movie_file, "Specifies a dsm format movie to play", "PATH_TO_PLAY_MOVIE"}, { "record-movie", 0, 0, G_OPTION_ARG_FILENAME, &_record_movie_file, "Specifies a path to a new dsm format movie", "PATH_TO_RECORD_MOVIE"}, + { "start-paused", 0, 0, G_OPTION_ARG_NONE, &start_paused, "Indicates that emulation should start paused", "START_PAUSED"}, #ifdef GDB_STUB { "arm9gdb", 0, 0, G_OPTION_ARG_INT, &arm9_gdb_port, "Enable the ARM9 GDB stub on the given port", "PORT_NUM"}, { "arm7gdb", 0, 0, G_OPTION_ARG_INT, &arm7_gdb_port, "Enable the ARM7 GDB stub on the given port", "PORT_NUM"}, diff --git a/desmume/src/commandline.h b/desmume/src/commandline.h index 9a825b1b4..eb843a468 100644 --- a/desmume/src/commandline.h +++ b/desmume/src/commandline.h @@ -41,6 +41,7 @@ public: std::string play_movie_file; std::string record_movie_file; int arm9_gdb_port, arm7_gdb_port; + int start_paused; //load up the common commandline options void loadCommonOptions(); diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 5d4feedd5..24c97f188 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -1898,7 +1898,8 @@ int _main() #endif { romloaded = TRUE; - NDS_UnPause(); + if(!cmdline.start_paused) + NDS_UnPause(); } }