diff --git a/BizHawk.Emulation/Database/Database.cs b/BizHawk.Emulation/Database/Database.cs index e1ebc665cc..c90d472d82 100644 --- a/BizHawk.Emulation/Database/Database.cs +++ b/BizHawk.Emulation/Database/Database.cs @@ -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;