Revert "Repair the mental damage with ZwinderStateManager having a method called HasState that doesn't actually tell you whether it has a state"
This reverts commit 7204eeb533
.
This commit is contained in:
parent
7204eeb533
commit
187cf46670
|
@ -469,7 +469,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public bool HasState(int frame)
|
||||
{
|
||||
return GetStateClosestToFrame(frame).Key == frame;
|
||||
return StateCache.Contains(frame);
|
||||
}
|
||||
|
||||
private bool InvalidateGaps(int frame)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue