Fix ClientApi.RunningSystem when using new PCE cores (fixes #2109)

This commit is contained in:
YoshiRulz 2020-06-08 08:06:42 +10:00
parent bd8003c725
commit 4cf30f4592
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 4 additions and 2 deletions

View File

@ -420,14 +420,16 @@ namespace BizHawk.Client.EmuHawk
{
switch (GlobalWin.Emulator.SystemId)
{
case "PCE":
return ((PCEngine) GlobalWin.Emulator).Type switch
case "PCE" when GlobalWin.Emulator is PCEngine pceHawk:
return pceHawk.Type switch
{
NecSystemType.TurboGrafx => SystemInfo.PCE,
NecSystemType.TurboCD => SystemInfo.PCECD,
NecSystemType.SuperGrafx => SystemInfo.SGX,
_ => throw new ArgumentOutOfRangeException()
};
case "PCE":
return SystemInfo.PCE; // not always accurate, but anyone wanting accuracy has probably figured out how to use IEmu.GetSystemId()
case "SMS":
var sms = (SMS) GlobalWin.Emulator;
return sms.IsSG1000