snes: movie recording starting from now now supported
This commit is contained in:
parent
7d21df6648
commit
8d1fcd0b8a
|
@ -627,17 +627,24 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES
|
|||
{
|
||||
var temp = SaveStateBinary();
|
||||
temp.SaveAsHex(writer);
|
||||
// write extra copy of stuff we don't use
|
||||
writer.WriteLine("Frame {0}", Frame);
|
||||
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);
|
||||
}
|
||||
public void LoadStateText(TextReader reader)
|
||||
{
|
||||
string hex = reader.ReadLine();
|
||||
if (hex.StartsWith("emuVersion")) // movie save
|
||||
{
|
||||
do // theoretically, our portion should start right after StartsFromSavestate, maybe...
|
||||
{
|
||||
hex = reader.ReadLine();
|
||||
} while (!hex.StartsWith("StartsFromSavestate"));
|
||||
hex = reader.ReadLine();
|
||||
}
|
||||
byte[] state = new byte[hex.Length / 2];
|
||||
state.ReadFromHex(hex);
|
||||
LoadStateBinary(new BinaryReader(new MemoryStream(state)));
|
||||
reader.ReadLine();
|
||||
reader.ReadLine(); // Frame #
|
||||
var profile = reader.ReadLine().Split(' ')[1];
|
||||
ValidateLoadstateProfile(profile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue