Store sync settings into the movie file, note: this does not include logic for deserializing sync settings and passing them to the core when loading a movie
This commit is contained in:
parent
0e02a78073
commit
5634b085cf
|
@ -20,7 +20,7 @@ namespace BizHawk.Client.Common
|
||||||
public const string FIRMWARESHA1 = "FirmwareSHA1";
|
public const string FIRMWARESHA1 = "FirmwareSHA1";
|
||||||
public const string PAL = "PAL";
|
public const string PAL = "PAL";
|
||||||
public const string BOARDNAME = "BoardName";
|
public const string BOARDNAME = "BoardName";
|
||||||
|
public const string SYNCSETTINGS = "SyncSettings";
|
||||||
// Core Setting
|
// Core Setting
|
||||||
public const string CORE = "Core";
|
public const string CORE = "Core";
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace BizHawk.Client.Common
|
||||||
string SavestateBinaryBase64Blob { get; set; }
|
string SavestateBinaryBase64Blob { get; set; }
|
||||||
string GameName { get; set; }
|
string GameName { get; set; }
|
||||||
string SystemID { get; set; }
|
string SystemID { get; set; }
|
||||||
|
string SyncSettingsJson { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Receives a line and attempts to add as a header
|
/// Receives a line and attempts to add as a header
|
||||||
|
|
|
@ -35,6 +35,24 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string SyncSettingsJson
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ContainsKey(HeaderKeys.SYNCSETTINGS))
|
||||||
|
{
|
||||||
|
return this[HeaderKeys.SYNCSETTINGS];
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this[HeaderKeys.SYNCSETTINGS] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ulong Rerecords
|
public ulong Rerecords
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -15,6 +15,8 @@ using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
|
||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class RecordMovie : Form
|
public partial class RecordMovie : Form
|
||||||
|
@ -94,10 +96,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
|
|
||||||
_movieToRecord.Header[HeaderKeys.AUTHOR] = AuthorBox.Text;
|
_movieToRecord.Header[HeaderKeys.AUTHOR] = AuthorBox.Text;
|
||||||
_movieToRecord.Header[HeaderKeys.EMULATIONVERSION] = VersionInfo.GetEmuVersion();
|
_movieToRecord.Header[HeaderKeys.EMULATIONVERSION] = VersionInfo.GetEmuVersion();
|
||||||
_movieToRecord.Header[HeaderKeys.MOVIEVERSION] = HeaderKeys.MovieVersion1;
|
_movieToRecord.Header[HeaderKeys.MOVIEVERSION] = HeaderKeys.MovieVersion1;
|
||||||
_movieToRecord.Header[HeaderKeys.PLATFORM] = Global.Game.System;
|
_movieToRecord.Header[HeaderKeys.PLATFORM] = Global.Game.System;
|
||||||
|
|
||||||
|
// Sync Settings, for movies 1.0, just dump a json blob into a header line
|
||||||
|
_movieToRecord.Header[HeaderKeys.SYNCSETTINGS] = JsonConvert.SerializeObject(Global.Emulator.GetSyncSettings());
|
||||||
|
|
||||||
if (Global.Game != null)
|
if (Global.Game != null)
|
||||||
{
|
{
|
||||||
_movieToRecord.Header[HeaderKeys.GAMENAME] = PathManager.FilesystemSafeName(Global.Game);
|
_movieToRecord.Header[HeaderKeys.GAMENAME] = PathManager.FilesystemSafeName(Global.Game);
|
||||||
|
|
Loading…
Reference in New Issue