From daee29865f7f85cc27403c7a75ae7205fbba312a Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 3 Oct 2018 17:06:41 -0500 Subject: [PATCH] win32: add InitialSnapshotFilename support. --- gtk/src/gtk_config.cpp | 1 - snes9x.cpp | 1 + win32/wsnes9x.cpp | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/src/gtk_config.cpp b/gtk/src/gtk_config.cpp index bbd4f7c2..9c0ca4c1 100644 --- a/gtk/src/gtk_config.cpp +++ b/gtk/src/gtk_config.cpp @@ -260,7 +260,6 @@ Snes9xConfig::load_defaults (void) Settings.InterpolationMethod = DSP_INTERPOLATION_GAUSSIAN; Settings.HDMATimingHack = 100; Settings.SuperFXClockMultiplier = 100; - Settings.InitialSnapshotFilename[0] = '\0'; #ifdef ALLOW_CPU_OVERCLOCK Settings.MaxSpriteTilesPerLine = 34; Settings.OneClockCycle = 6; diff --git a/snes9x.cpp b/snes9x.cpp index 81bd0781..3c601a9d 100644 --- a/snes9x.cpp +++ b/snes9x.cpp @@ -416,6 +416,7 @@ void S9xLoadConfigFiles (char **argv, int argc) } rom_filename = conf.GetStringDup("ROM::Filename", NULL); + Settings.InitialSnapshotFilename[0] = '\0'; // Sound diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 18433923..f7cdeb26 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -3521,6 +3521,11 @@ int WINAPI WinMain( { LoadROM(rom_filename); } + + if (*Settings.InitialSnapshotFilename) + { + S9xUnfreezeGame(Settings.InitialSnapshotFilename); + } } S9xUnmapAllControls();