From b77cd9a7bf96b3bba259ad877c2fe730993490d5 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 31 Jul 2020 16:17:02 +1000 Subject: [PATCH] Remove IEmuClientApi.RunningSystem from the API other code in EmuClientApi (the impl.) uses this prop, so it's staying for now --- src/BizHawk.Client.Common/Api/Interfaces/IEmuClientApi.cs | 2 -- src/BizHawk.Client.EmuHawk/Api/ClientApi.cs | 3 --- src/BizHawk.Client.EmuHawk/Api/Libraries/EmuClientApi.cs | 5 +++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/BizHawk.Client.Common/Api/Interfaces/IEmuClientApi.cs b/src/BizHawk.Client.Common/Api/Interfaces/IEmuClientApi.cs index fe25565484..9530c6d05d 100644 --- a/src/BizHawk.Client.Common/Api/Interfaces/IEmuClientApi.cs +++ b/src/BizHawk.Client.Common/Api/Interfaces/IEmuClientApi.cs @@ -7,8 +7,6 @@ namespace BizHawk.Client.Common { public interface IEmuClientApi : IExternalApi { - SystemInfo RunningSystem { get; } - /// /// Occurs before a quickload is done (just after user has pressed the shortcut button /// or has click on the item menu) diff --git a/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs b/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs index d68e4e221f..16ab063aff 100644 --- a/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs +++ b/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs @@ -8,9 +8,6 @@ namespace BizHawk.Client.EmuHawk { public static class ClientApi { - /// - public static SystemInfo RunningSystem => GlobalWin.ClientApi.RunningSystem; - /// public static event BeforeQuickLoadEventHandler BeforeQuickLoad { diff --git a/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuClientApi.cs b/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuClientApi.cs index 984992fa37..ab36967395 100644 --- a/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuClientApi.cs +++ b/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuClientApi.cs @@ -39,7 +39,8 @@ namespace BizHawk.Client.EmuHawk private readonly JoypadStringToEnumConverter JoypadConverter = new JoypadStringToEnumConverter(); - public SystemInfo RunningSystem + /// future humans: if this is broken, rewrite the caller instead if fixing it + private SystemInfo RunningSystem { get { @@ -54,7 +55,7 @@ namespace BizHawk.Client.EmuHawk _ => throw new ArgumentOutOfRangeException() }; case "PCE": - return SystemInfo.PCE; // not always accurate, but anyone wanting accuracy has probably figured out how to use IEmu.GetSystemId() + return SystemInfo.PCE; case "SMS": var sms = (SMS) Emulator; return sms.IsSG1000