Merge pull request #267 from julien2512/master

now able to start from a snapshot
This commit is contained in:
bearoso 2018-02-27 22:43:55 +00:00 committed by GitHub
commit c3fa4009a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -125,6 +125,9 @@ main (int argc, char *argv[])
gtk_window_present (top_level->get_window ());
if (rom_filename && Settings.InitialSnapshotFilename)
S9xUnfreezeGame(Settings.InitialSnapshotFilename);
gtk_main ();
return 0;
}

View File

@ -756,6 +756,17 @@ char * S9xParseArgs (char **argv, int argc)
else
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

View File

@ -457,6 +457,7 @@ struct SSettings
bool8 TakeScreenshot;
int8 StretchScreenshots;
bool8 SnapshotScreenshots;
char InitialSnapshotFilename[PATH_MAX + 1];
bool8 ApplyCheats;
bool8 NoPatch;