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 (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());
|
gtk_window_unfullscreen (top_level->get_window());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +128,9 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
gtk_window_present (top_level->get_window ());
|
gtk_window_present (top_level->get_window ());
|
||||||
|
|
||||||
|
if (rom_filename && Settings.InitialSnapshotFilename)
|
||||||
|
S9xUnfreezeGame(Settings.InitialSnapshotFilename);
|
||||||
|
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
gdk_threads_leave ();
|
gdk_threads_leave ();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
11
snes9x.cpp
11
snes9x.cpp
|
@ -756,6 +756,17 @@ char * S9xParseArgs (char **argv, int argc)
|
||||||
else
|
else
|
||||||
if (!strcasecmp(argv[i], "-bsxbootup"))
|
if (!strcasecmp(argv[i], "-bsxbootup"))
|
||||||
Settings.BSXBootup = TRUE;
|
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
|
else
|
||||||
|
|
||||||
// PATCH/CHEAT OPTIONS
|
// PATCH/CHEAT OPTIONS
|
||||||
|
|
1
snes9x.h
1
snes9x.h
|
@ -457,6 +457,7 @@ struct SSettings
|
||||||
bool8 TakeScreenshot;
|
bool8 TakeScreenshot;
|
||||||
int8 StretchScreenshots;
|
int8 StretchScreenshots;
|
||||||
bool8 SnapshotScreenshots;
|
bool8 SnapshotScreenshots;
|
||||||
|
char InitialSnapshotFilename[PATH_MAX + 1];
|
||||||
|
|
||||||
bool8 ApplyCheats;
|
bool8 ApplyCheats;
|
||||||
bool8 NoPatch;
|
bool8 NoPatch;
|
||||||
|
|
Loading…
Reference in New Issue