parent
ee220f455c
commit
c6bee8bab6
|
@ -15,8 +15,6 @@ namespace BizHawk.Client.Common
|
|||
public const string StartsFromSaveram = "StartsFromSaveRam";
|
||||
public const string SavestateBinaryBase64Blob = "SavestateBinaryBase64Blob"; // this string will not contain base64: ; it's implicit (this is to avoid another big string op to dice off the base64: substring)
|
||||
public const string Sha1 = "SHA1";
|
||||
public const string Md5 = "MD5";
|
||||
public const string Crc32 = "CRC32";
|
||||
public const string FirmwareSha1 = "FirmwareSHA1";
|
||||
public const string Pal = "PAL";
|
||||
public const string BoardName = "BoardName";
|
||||
|
|
|
@ -108,49 +108,13 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public string Hash
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Header[HeaderKeys.Sha1] != string.Empty)
|
||||
{
|
||||
return Header[HeaderKeys.Sha1];
|
||||
}
|
||||
else if (Header[HeaderKeys.Md5] != string.Empty)
|
||||
{
|
||||
return Header[HeaderKeys.Md5];
|
||||
}
|
||||
else
|
||||
{
|
||||
return Header[HeaderKeys.Crc32];
|
||||
}
|
||||
}
|
||||
get => Header[HeaderKeys.Sha1];
|
||||
set
|
||||
{
|
||||
if (value.Length == 40)
|
||||
if (Header[HeaderKeys.Sha1] != value)
|
||||
{
|
||||
if (Header[HeaderKeys.Sha1] != value || Header[HeaderKeys.Md5] != string.Empty || Header[HeaderKeys.Crc32] != string.Empty)
|
||||
{
|
||||
Changes = true;
|
||||
Header[HeaderKeys.Sha1] = value;
|
||||
Header[HeaderKeys.Md5] = Header[HeaderKeys.Crc32] = "";
|
||||
}
|
||||
}
|
||||
else if (value.Length == 32)
|
||||
{
|
||||
if (Header[HeaderKeys.Md5] != value || Header[HeaderKeys.Sha1] != string.Empty || Header[HeaderKeys.Crc32] != string.Empty)
|
||||
{
|
||||
Changes = true;
|
||||
Header[HeaderKeys.Md5] = value;
|
||||
Header[HeaderKeys.Sha1] = Header[HeaderKeys.Crc32] = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Header[HeaderKeys.Crc32] != value || Header[HeaderKeys.Sha1] != string.Empty || Header[HeaderKeys.Md5] != string.Empty)
|
||||
{
|
||||
Changes = true;
|
||||
Header[HeaderKeys.Crc32] = value;
|
||||
Header[HeaderKeys.Sha1] = Header[HeaderKeys.Md5] = "";
|
||||
}
|
||||
Changes = true;
|
||||
Header[HeaderKeys.Sha1] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -392,8 +392,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
switch (k)
|
||||
{
|
||||
case HeaderKeys.Sha1:
|
||||
case HeaderKeys.Md5:
|
||||
case HeaderKeys.Crc32:
|
||||
if (_game.Hash != v)
|
||||
{
|
||||
item.BackColor = Color.Pink;
|
||||
|
|
Loading…
Reference in New Issue