Use fast version of reading/writing hex on snes savestates too, they could use the speed

This commit is contained in:
adelikat 2013-08-05 12:57:08 +00:00
parent ef36677168
commit 21552eaeec
1 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES
public void SaveStateText(TextWriter writer) public void SaveStateText(TextWriter writer)
{ {
var temp = SaveStateBinary(); var temp = SaveStateBinary();
temp.SaveAsHex(writer); temp.SaveAsHexFast(writer);
writer.WriteLine("Frame {0}", Frame); // we don't parse this, it's only for the client to use writer.WriteLine("Frame {0}", Frame); // we don't parse this, it's only for the client to use
writer.WriteLine("Profile {0}", CoreComm.SNES_Profile); writer.WriteLine("Profile {0}", CoreComm.SNES_Profile);
} }
@ -712,7 +712,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES
hex = reader.ReadLine(); hex = reader.ReadLine();
} }
byte[] state = new byte[hex.Length / 2]; byte[] state = new byte[hex.Length / 2];
state.ReadFromHex(hex); state.ReadFromHexFast(hex);
LoadStateBinary(new BinaryReader(new MemoryStream(state))); LoadStateBinary(new BinaryReader(new MemoryStream(state)));
reader.ReadLine(); // Frame # reader.ReadLine(); // Frame #
var profile = reader.ReadLine().Split(' ')[1]; var profile = reader.ReadLine().Split(' ')[1];