Update emuVersion each time the movie is opened; OriginalEmuVersion preserves old behavior. (#2193)
This commit is contained in:
parent
9e980c7732
commit
0b07e38bdf
|
@ -4,7 +4,8 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
public static class HeaderKeys
|
public static class HeaderKeys
|
||||||
{
|
{
|
||||||
public const string EmulationVersion = "emuVersion";
|
public const string EmulatorVersion = "emuVersion";
|
||||||
|
public const string OriginalEmulatorVersion = "OriginalEmuVersion";
|
||||||
public const string MovieVersion = "MovieVersion";
|
public const string MovieVersion = "MovieVersion";
|
||||||
public const string Platform = "Platform";
|
public const string Platform = "Platform";
|
||||||
public const string GameName = "GameName";
|
public const string GameName = "GameName";
|
||||||
|
|
|
@ -191,6 +191,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
movie.Author = author;
|
movie.Author = author;
|
||||||
movie.EmulatorVersion = VersionInfo.GetEmuVersion();
|
movie.EmulatorVersion = VersionInfo.GetEmuVersion();
|
||||||
|
movie.OriginalEmulatorVersion = VersionInfo.GetEmuVersion();
|
||||||
movie.SystemID = emulator.SystemId;
|
movie.SystemID = emulator.SystemId;
|
||||||
|
|
||||||
var settable = new SettingsAdapter(emulator);
|
var settable = new SettingsAdapter(emulator);
|
||||||
|
|
|
@ -167,13 +167,26 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public string EmulatorVersion
|
public string EmulatorVersion
|
||||||
{
|
{
|
||||||
get => Header[HeaderKeys.EmulationVersion];
|
get => Header[HeaderKeys.EmulatorVersion];
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (Header[HeaderKeys.EmulationVersion] != value)
|
if (Header[HeaderKeys.EmulatorVersion] != value)
|
||||||
{
|
{
|
||||||
Changes = true;
|
Changes = true;
|
||||||
Header[HeaderKeys.EmulationVersion] = value;
|
Header[HeaderKeys.EmulatorVersion] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string OriginalEmulatorVersion
|
||||||
|
{
|
||||||
|
get => Header[HeaderKeys.OriginalEmulatorVersion];
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Header[HeaderKeys.OriginalEmulatorVersion] != value)
|
||||||
|
{
|
||||||
|
Changes = true;
|
||||||
|
Header[HeaderKeys.OriginalEmulatorVersion] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,12 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// EmulatorVersion used to store the unchanging original emulator version.
|
||||||
|
if (!Header.ContainsKey(HeaderKeys.OriginalEmulatorVersion))
|
||||||
|
{
|
||||||
|
Header[HeaderKeys.OriginalEmulatorVersion] = Header[HeaderKeys.EmulatorVersion];
|
||||||
|
}
|
||||||
|
Header[HeaderKeys.EmulatorVersion] = VersionInfo.GetEmuVersion();
|
||||||
|
|
||||||
bl.GetLump(BinaryStateLump.Comments, false, delegate(TextReader tr)
|
bl.GetLump(BinaryStateLump.Comments, false, delegate(TextReader tr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,6 +90,7 @@ namespace BizHawk.Client.Common
|
||||||
string Author { get; set; }
|
string Author { get; set; }
|
||||||
string Core { get; set; }
|
string Core { get; set; }
|
||||||
string EmulatorVersion { get; set; }
|
string EmulatorVersion { get; set; }
|
||||||
|
string OriginalEmulatorVersion { get; set; }
|
||||||
string FirmwareHash { get; set; }
|
string FirmwareHash { get; set; }
|
||||||
string BoardName { get; set; }
|
string BoardName { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -420,7 +420,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
toolTip1.SetToolTip(DetailsView, $"Current SHA1: {_game.Hash}");
|
toolTip1.SetToolTip(DetailsView, $"Current SHA1: {_game.Hash}");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HeaderKeys.EmulationVersion:
|
case HeaderKeys.EmulatorVersion:
|
||||||
if (kvp.Value != VersionInfo.GetEmuVersion())
|
if (kvp.Value != VersionInfo.GetEmuVersion())
|
||||||
{
|
{
|
||||||
item.BackColor = Color.Yellow;
|
item.BackColor = Color.Yellow;
|
||||||
|
|
Loading…
Reference in New Issue