Tastudio - rework StateHistory integrity check to not use HasState() removing any possibility of a cache mismatch causing a false positive of a bad savestate

This commit is contained in:
adelikat 2021-01-16 13:14:57 -06:00
parent 9cca7c4a31
commit 4a58ff2a0c
1 changed files with 3 additions and 2 deletions

View File

@ -788,10 +788,10 @@ namespace BizHawk.Client.EmuHawk
{
MainForm.FrameAdvance();
if (CurrentTasMovie.TasStateManager.HasState(Emulator.Frame))
byte[] greenZone = CurrentTasMovie.TasStateManager[Emulator.Frame];
if (greenZone.Length > 0)
{
byte[] state = StatableEmulator.CloneSavestate();
byte[] greenZone = CurrentTasMovie.TasStateManager[Emulator.Frame];
if (!state.SequenceEqual(greenZone))
{
@ -805,6 +805,7 @@ namespace BizHawk.Client.EmuHawk
File.WriteAllBytes(path, greenZone);
}
}
return;
}