From eb67d2b666f51772adb4891ffeeb5c8ad129d86a Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 4 Sep 2012 20:29:37 +0000 Subject: [PATCH] fix archive chooser opening issue with zips containing solely one .sfc --- BizHawk.Emulation/Database/Database.cs | 4 ++++ BizHawk.MultiClient/MainForm.cs | 28 +++----------------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/BizHawk.Emulation/Database/Database.cs b/BizHawk.Emulation/Database/Database.cs index b5e2818f8b..83a7a6d3f8 100644 --- a/BizHawk.Emulation/Database/Database.cs +++ b/BizHawk.Emulation/Database/Database.cs @@ -127,6 +127,10 @@ namespace BizHawk switch (ext) { + case ".SFC": + case ".SMC": + Game.System = "SNES"; + break; case ".SMS": Game.System = "SMS"; break; case ".GG": Game.System = "GG"; break; case ".SG": Game.System = "SG"; break; diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 69184d168b..706a523e86 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -1206,7 +1206,7 @@ namespace BizHawk.MultiClient if (path == null) return false; using (var file = new HawkFile()) { - string[] romExtensions = new string[] { "SMS", "SMC", "PCE", "SGX", "GG", "SG", "BIN", "GEN", "SMD", "GB", "NES", "ROM", "INT" }; + string[] romExtensions = new string[] { "SMS", "SMC", "SFC", "PCE", "SGX", "GG", "SG", "BIN", "GEN", "SMD", "GB", "NES", "ROM", "INT" }; //lets not use this unless we need to //file.NonArchiveExtensions = romExtensions; @@ -1322,33 +1322,11 @@ namespace BizHawk.MultiClient rom = new RomGame(file); game = rom.GameInfo; - //use some heuristics to figure out what game type it might be - if (game.NotInDatabase) - { - //try asking the snes core - on second thought, dont. because it detects everything as snes. - //maybe we'll try improving this later, but probably not - //if (LibsnesDll.snes_check_cartridge(rom.FileData, rom.FileData.Length)) - //{ - // game.System = "SNES"; - //} - //else - { - //try and use the extension - switch (file.Extension.ToUpper()) - { - case ".SFC": - case ".SMC": - game.System = "SNES"; - break; - } - } - } - switch (game.System) { case "SNES": - nextEmulator = new LibsnesCore(rom.FileData); - game.System = "SNES"; + nextEmulator = new LibsnesCore(rom.FileData); + game.System = "SNES"; break; case "SMS": case "SG":