C64 - fix framecount getting reset to 0 on savestate, not sure why it was broken teh way it was and why this is necessary but meh, it is fixed and more like how other cores handle Frame anyways

This commit is contained in:
adelikat 2017-05-10 16:28:27 -05:00
parent 9a936ec2d6
commit 7b2b1c325b
1 changed files with 7 additions and 3 deletions

View File

@ -133,8 +133,12 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
public string SystemId { get { return "C64"; } }
[SaveState.SaveWithName("DeterministicEmulation")]
public bool DeterministicEmulation { get; set; }
[SaveState.SaveWithName("Frame")]
public int Frame { get; set; }
private int _frame;
[SaveState.DoNotSave]
public int Frame => _frame;
[SaveState.DoNotSave]
public ControllerDefinition ControllerDefinition { get { return C64ControllerDefinition; } }
@ -144,7 +148,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
public void ResetCounters()
{
Frame = 0;
_frame = 0;
LagCount = 0;
IsLagFrame = false;
_frameCycles = 0;
@ -193,7 +197,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
if (IsLagFrame)
LagCount++;
_frameCycles -= _cyclesPerFrame;
Frame++;
_frame++;
}
private byte[] GetFirmware(int length, params string[] names)