SMS: fix a nullptrexception on Auto region setting and game not in DB. Fix logical error with YM2413 disable setting and game not in db.

This commit is contained in:
beirich 2014-03-25 02:12:42 +00:00
parent e8c0c21c7c
commit 13ebf95362
1 changed files with 4 additions and 2 deletions

View File

@ -116,7 +116,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
CoreComm.Notify("Region was forced to Japan for game compatibility.");
}
if (game.NotInDatabase || game["FM"] && SyncSettings.EnableFM && !IsGameGear)
if ((game.NotInDatabase || game["FM"]) && SyncSettings.EnableFM && !IsGameGear)
HasYM2413 = true;
if (Controller == null)
@ -199,6 +199,8 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
string DetermineRegion(string gameRegion)
{
if (gameRegion == null)
return "Export";
if (gameRegion.IndexOf("USA") >= 0)
return "Export";
if (gameRegion.IndexOf("Europe") >= 0)
@ -216,7 +218,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
{
if (display == "NTSC") return DisplayType.NTSC;
if (display == "PAL") return DisplayType.PAL;
if (region == "Europe") return DisplayType.PAL;
if (region != null && region == "Europe") return DisplayType.PAL;
return DisplayType.NTSC;
}