Use pattern matching to simplify some string comparisons
This commit is contained in:
parent
4ac8d55fb1
commit
3540f48847
|
@ -85,7 +85,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
|
||||||
cpu.SetCallbacks(ReadMemory, PeekMemory, PeekMemory, WriteMemory);
|
cpu.SetCallbacks(ReadMemory, PeekMemory, PeekMemory, WriteMemory);
|
||||||
|
|
||||||
// set up differences between PAL and NTSC systems
|
// set up differences between PAL and NTSC systems
|
||||||
if ((game.Region == "US" || game.Region == "EU-US" || game.Region == null) && !is_G7400)
|
if (!is_G7400 && game.Region is null or "US" or "EU-US")
|
||||||
{
|
{
|
||||||
is_pal = false;
|
is_pal = false;
|
||||||
pic_height = 240;
|
pic_height = 240;
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
_disableExpansionSlot = _syncSettings.DisableExpansionSlot;
|
_disableExpansionSlot = _syncSettings.DisableExpansionSlot;
|
||||||
|
|
||||||
// Override the user's expansion slot setting if it is mentioned in the gamedb (it is mentioned but the game MUST have this setting or else not work
|
// Override the user's expansion slot setting if it is mentioned in the gamedb (it is mentioned but the game MUST have this setting or else not work
|
||||||
if (game.OptionValue("expansionpak") != null && game.OptionValue("expansionpak") == "1")
|
if (game.OptionValue("expansionpak") is "1")
|
||||||
{
|
{
|
||||||
_disableExpansionSlot = false;
|
_disableExpansionSlot = false;
|
||||||
IsOverridingUserExpansionSlotSetting = true;
|
IsOverridingUserExpansionSlotSetting = true;
|
||||||
|
|
|
@ -297,7 +297,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
{
|
{
|
||||||
if (display == SmsSyncSettings.DisplayTypes.Ntsc) return DisplayType.NTSC;
|
if (display == SmsSyncSettings.DisplayTypes.Ntsc) return DisplayType.NTSC;
|
||||||
if (display == SmsSyncSettings.DisplayTypes.Pal) return DisplayType.PAL;
|
if (display == SmsSyncSettings.DisplayTypes.Pal) return DisplayType.PAL;
|
||||||
if (region != null && region == "Europe") return DisplayType.PAL;
|
if (region is "Europe") return DisplayType.PAL;
|
||||||
return DisplayType.NTSC;
|
return DisplayType.NTSC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue