From f2ce38851a2d91f856f6ed1d1cdc0708fb3531ff Mon Sep 17 00:00:00 2001 From: goyuken Date: Tue, 11 Sep 2012 01:46:57 +0000 Subject: [PATCH] add IsLagFrame, LagCount, Frame to Gambatte savestates --- .../Consoles/Nintendo/Gameboy/Gambatte.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs index db24d2f677..439cd60c03 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -203,6 +203,11 @@ namespace BizHawk.Emulation.Consoles.GB writer.Write((int)nlen); writer.Write(data); + + // other variables + writer.Write(IsLagFrame); + writer.Write(LagCount); + writer.Write(Frame); } public void LoadStateBinary(System.IO.BinaryReader reader) @@ -212,6 +217,11 @@ namespace BizHawk.Emulation.Consoles.GB if (!LibGambatte.gambatte_loadstate(GambatteState, data, (uint)length)) throw new Exception("Gambatte failed to load the savestate!"); + + // other variables + IsLagFrame = reader.ReadBoolean(); + LagCount = reader.ReadInt32(); + Frame = reader.ReadInt32(); } public byte[] SaveStateBinary()