tweak game database hashing to be less upsetting

This commit is contained in:
zeromus 2011-06-19 02:21:17 +00:00
parent 47ebedb40c
commit 23e4eed70d
1 changed files with 6 additions and 6 deletions

View File

@ -55,12 +55,8 @@ namespace BizHawk
public static GameInfo CheckDatabase(string hash)
{
GameInfo ret = null;
if (!db.TryGetValue(hash, out ret))
{
//try removing hash type identifier
hash = RemoveHashType(hash);
db.TryGetValue(hash, out ret);
}
hash = RemoveHashType(hash);
db.TryGetValue(hash, out ret);
return ret;
}
@ -117,6 +113,10 @@ namespace BizHawk
if (db.TryGetValue(hash, out ret))
return ret;
hash = Util.BytesToHexString(System.Security.Cryptography.SHA1.Create().ComputeHash(RomData));
if (db.TryGetValue(hash, out ret))
return ret;
hash = Util.BytesToHexString(System.Security.Cryptography.MD5.Create().ComputeHash(RomData));
if (db.TryGetValue(hash, out ret))
return ret;