Movie Savestate blob from IMovieHeader to IMovie, Movie and TasMovie just use the MovieHeader object as usual, but at least the calling code no longer expects that
This commit is contained in:
parent
229a6f6ac9
commit
47d5b1e2e2
|
@ -65,6 +65,19 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public string SavestateBinaryBase64Blob
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsActive
|
||||
{
|
||||
get { return _mode != Moviemode.Inactive; }
|
||||
|
|
|
@ -68,6 +68,19 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public string SavestateBinaryBase64Blob
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Header as MovieHeader).SavestateBinaryBase64Blob;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
(Header as MovieHeader).SavestateBinaryBase64Blob = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string PreferredExtension { get { return "bkm"; } }
|
||||
|
||||
// TODO: delete me
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace BizHawk.Client.Common
|
|||
IMovieHeader Header { get; }
|
||||
SubtitleList Subtitles { get; }
|
||||
IList<string> Comments { get; }
|
||||
string SavestateBinaryBase64Blob { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
ulong Rerecords { get; set; }
|
||||
bool StartsFromSavestate { get; set; }
|
||||
string SavestateBinaryBase64Blob { get; set; }
|
||||
string GameName { get; set; }
|
||||
string SystemID { get; set; }
|
||||
|
||||
|
|
|
@ -109,6 +109,19 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public string SavestateBinaryBase64Blob
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Header as MovieHeader).SavestateBinaryBase64Blob;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
(Header as MovieHeader).SavestateBinaryBase64Blob = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
public IMovieHeader Header { get; private set; }
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (Global.MovieSession.Movie.Header.StartsFromSavestate)
|
||||
{
|
||||
var state = Convert.FromBase64String(Global.MovieSession.Movie.Header.SavestateBinaryBase64Blob);
|
||||
var state = Convert.FromBase64String(Global.MovieSession.Movie.SavestateBinaryBase64Blob);
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(state)));
|
||||
Global.Emulator.ResetCounters();
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
LoadRom(CurrentlyOpenRom);
|
||||
if (Global.MovieSession.Movie.Header.StartsFromSavestate)
|
||||
{
|
||||
var state = Convert.FromBase64String(Global.MovieSession.Movie.Header.SavestateBinaryBase64Blob);
|
||||
var state = Convert.FromBase64String(Global.MovieSession.Movie.SavestateBinaryBase64Blob);
|
||||
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(state)));
|
||||
Global.Emulator.ResetCounters();
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
//theres no sense hexifying those again. we need to record that fact in the IEmulator somehow
|
||||
var bytestate = Global.Emulator.SaveStateBinary();
|
||||
string stringstate = Convert.ToBase64String(bytestate);
|
||||
_movieToRecord.Header.SavestateBinaryBase64Blob = stringstate;
|
||||
_movieToRecord.SavestateBinaryBase64Blob = stringstate;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue