Skip to content

Commit

Permalink
Remove IEmuClientApi.RunningSystem from the API
Browse files Browse the repository at this point in the history
other code in EmuClientApi (the impl.) uses this prop, so it's staying for now
  • Loading branch information
YoshiRulz committed Jul 31, 2020
1 parent 9b5997c commit b77cd9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/BizHawk.Client.Common/Api/Interfaces/IEmuClientApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ namespace BizHawk.Client.Common
{
public interface IEmuClientApi : IExternalApi
{
SystemInfo RunningSystem { get; }

/// <summary>
/// Occurs before a quickload is done (just after user has pressed the shortcut button
/// or has click on the item menu)
Expand Down
3 changes: 0 additions & 3 deletions src/BizHawk.Client.EmuHawk/Api/ClientApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ namespace BizHawk.Client.EmuHawk
{
public static class ClientApi
{
/// <inheritdoc cref="IEmuClientApi.DoFrameAdvance"/>
public static SystemInfo RunningSystem => GlobalWin.ClientApi.RunningSystem;

/// <inheritdoc cref="IEmuClientApi.BeforeQuickLoad"/>
public static event BeforeQuickLoadEventHandler BeforeQuickLoad
{
Expand Down
5 changes: 3 additions & 2 deletions src/BizHawk.Client.EmuHawk/Api/Libraries/EmuClientApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public sealed class EmuClientApi : IEmuClientApi

private readonly JoypadStringToEnumConverter JoypadConverter = new JoypadStringToEnumConverter();

public SystemInfo RunningSystem
/// <remarks>future humans: if this is broken, rewrite the caller instead if fixing it</remarks>
private SystemInfo RunningSystem
{
get
{
Expand All @@ -54,7 +55,7 @@ public SystemInfo RunningSystem
_ => 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
Expand Down

0 comments on commit b77cd9a

Please sign in to comment.