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();
|
var temp = SaveStateBinary();
|
||||||
temp.SaveAsHex(writer);
|
temp.SaveAsHex(writer);
|
||||||
// write extra copy of stuff we don't use
|
writer.WriteLine("Frame {0}", Frame); // we don't parse this, it's only for the client to use
|
||||||
writer.WriteLine("Frame {0}", Frame);
|
|
||||||
writer.WriteLine("Profile {0}", CoreComm.SNES_Profile);
|
writer.WriteLine("Profile {0}", CoreComm.SNES_Profile);
|
||||||
}
|
}
|
||||||
public void LoadStateText(TextReader reader)
|
public void LoadStateText(TextReader reader)
|
||||||
{
|
{
|
||||||
string hex = reader.ReadLine();
|
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];
|
byte[] state = new byte[hex.Length / 2];
|
||||||
state.ReadFromHex(hex);
|
state.ReadFromHex(hex);
|
||||||
LoadStateBinary(new BinaryReader(new MemoryStream(state)));
|
LoadStateBinary(new BinaryReader(new MemoryStream(state)));
|
||||||
reader.ReadLine();
|
reader.ReadLine(); // Frame #
|
||||||
var profile = reader.ReadLine().Split(' ')[1];
|
var profile = reader.ReadLine().Split(' ')[1];
|
||||||
ValidateLoadstateProfile(profile);
|
ValidateLoadstateProfile(profile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue