add a common commandline option --start-paused for when a rom is specified on commandline (but you dont want it to start immediately)

This commit is contained in:
zeromus 2009-06-17 21:52:40 +00:00
parent 258f1fb2c3
commit ada3cc8c59
3 changed files with 5 additions and 1 deletions

View File

@ -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"},

View File

@ -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();

View File

@ -1898,7 +1898,8 @@ int _main()
#endif
{
romloaded = TRUE;
NDS_UnPause();
if(!cmdline.start_paused)
NDS_UnPause();
}
}