mirror of https://github.com/snes9xgit/snes9x.git
now able to start from a snapshot
This commit is contained in:
parent
b7a2486ace
commit
51c25d070d
|
@ -105,7 +105,7 @@ main (int argc, char *argv[])
|
|||
|
||||
if (rom_filename)
|
||||
{
|
||||
if (S9xOpenROM (rom_filename) && gui_config->full_screen_on_open)
|
||||
if ((rom_opened=S9xOpenROM (rom_filename)) && gui_config->full_screen_on_open)
|
||||
gtk_window_unfullscreen (top_level->get_window());
|
||||
}
|
||||
|
||||
|
@ -128,6 +128,9 @@ main (int argc, char *argv[])
|
|||
|
||||
gtk_window_present (top_level->get_window ());
|
||||
|
||||
if (rom_filename && Settings.InitialSnapshotFilename)
|
||||
S9xUnfreezeGame(Settings.InitialSnapshotFilename);
|
||||
|
||||
gtk_main ();
|
||||
gdk_threads_leave ();
|
||||
return 0;
|
||||
|
|
11
snes9x.cpp
11
snes9x.cpp
|
@ -757,6 +757,17 @@ char * S9xParseArgs (char **argv, int argc)
|
|||
if (!strcasecmp(argv[i], "-bsxbootup"))
|
||||
Settings.BSXBootup = TRUE;
|
||||
else
|
||||
if (!strcasecmp(argv[i], "-snapshot"))
|
||||
{
|
||||
if (i + 1 < argc)
|
||||
{
|
||||
strncpy(Settings.InitialSnapshotFilename, argv[++i], PATH_MAX);
|
||||
Settings.InitialSnapshotFilename[PATH_MAX] = 0;
|
||||
}
|
||||
else
|
||||
S9xUsage();
|
||||
}
|
||||
else
|
||||
|
||||
// PATCH/CHEAT OPTIONS
|
||||
|
||||
|
|
Loading…
Reference in New Issue