From 558fb67984a0c6bd374aaa1d8a0e9f5cdad81690 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 18 May 2014 01:00:35 +0000 Subject: [PATCH] Fix "starts from now" on SMB3 in quicknes, and who knows what other scenarios for savestate anchored movies --- BizHawk.Client.Common/movie/Movie.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.Common/movie/Movie.cs b/BizHawk.Client.Common/movie/Movie.cs index 1d4dfd495c..36c11e348e 100644 --- a/BizHawk.Client.Common/movie/Movie.cs +++ b/BizHawk.Client.Common/movie/Movie.cs @@ -104,7 +104,15 @@ namespace BizHawk.Client.Common public void StartNewRecording() { - Global.Emulator.ClearSaveRam(); + // adelikat: ClearSaveRam shouldn't be here at all most likely, especially considering this is an implementation detail + // If Starting a new recording requires clearing sram it shoudl be done at a higher layer and not rely on all IMovies doing this + // Haven't removed it yet because I coudln't guarantee that power-on movies coudl live without it + // And the immediate fire is that Savestate movies are breaking + if (!Header.StartsFromSavestate) + { + Global.Emulator.ClearSaveRam(); + } + _mode = Moviemode.Record; if (Global.Config.EnableBackupMovies && MakeBackup && _log.Length > 0) { @@ -117,7 +125,12 @@ namespace BizHawk.Client.Common public void StartNewPlayback() { - Global.Emulator.ClearSaveRam(); + // See StartNewRecording for details as to why this savestate check is here + if (!Header.StartsFromSavestate) + { + Global.Emulator.ClearSaveRam(); + } + _mode = Moviemode.Play; }