Repair the mental damage with ZwinderStateManager having a method called HasState that doesn't actually tell you whether it has a state
Reverts commit 4a58ff2a0c
and instead updates ZwinderStateManager to use what apparently is the correct (?) way to tell whether a state is had.
This commit is contained in:
parent
c218cf302f
commit
7204eeb533
|
@ -469,7 +469,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public bool HasState(int frame)
|
||||
{
|
||||
return StateCache.Contains(frame);
|
||||
return GetStateClosestToFrame(frame).Key == frame;
|
||||
}
|
||||
|
||||
private bool InvalidateGaps(int frame)
|
||||
|
|
|
@ -788,10 +788,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
MainForm.FrameAdvance();
|
||||
|
||||
byte[] greenZone = CurrentTasMovie.TasStateManager[Emulator.Frame];
|
||||
if (greenZone.Length > 0)
|
||||
if (CurrentTasMovie.TasStateManager.HasState(Emulator.Frame))
|
||||
{
|
||||
byte[] state = StatableEmulator.CloneSavestate();
|
||||
byte[] greenZone = CurrentTasMovie.TasStateManager[Emulator.Frame];
|
||||
|
||||
if (!state.SequenceEqual(greenZone))
|
||||
{
|
||||
|
@ -805,7 +805,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
File.WriteAllBytes(path, greenZone);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue