diff --git a/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs b/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs index 8ddfc9542c..f92d5e6417 100644 --- a/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs +++ b/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs @@ -169,19 +169,19 @@ namespace BizHawk.Client.EmuHawk .GetTypes() .Where(t => typeof(IEmulatorService).IsAssignableFrom(t)) .Where(t => t != typeof(IEmulatorService)) - .Where(t => t.IsInterface) - .Select(t => t.ToString()); + .Where(t => t.IsInterface); var additionalServices = knownServies - .Where(s => !ci.Services.ContainsKey(s)) - .Where(s => !ci.NotApplicableTypes.Contains(s)); + .Where(t => !ci.Services.ContainsKey(t.ToString())) + .Where(t => !ci.NotApplicableTypes.Contains(t.ToString())) + .Where(t => !typeof(ISpecializedEmulatorService).IsAssignableFrom(t)); // We don't want to show these as unimplemented, they aren't expected services - foreach (string servicename in additionalServices) + foreach (Type service in additionalServices) { string img = "Bad"; var serviceNode = new TreeNode { - Text = servicename, + Text = service.ToString(), ForeColor = Color.Red, ImageKey = img, SelectedImageKey = img, diff --git a/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs b/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs index 5de00c7d3b..0b9dd2fc44 100644 --- a/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs +++ b/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs @@ -22,6 +22,14 @@ namespace BizHawk.Emulation.Common public FeatureNotImplemented() { } } + /// + /// This represents a service that would not apply to every core, instead it is a specialized service specific to a core or group of cores + /// This service is merely intended to define semantics and expectations of a service + /// + public interface ISpecializedEmulatorService : IEmulatorService + { + } + [AttributeUsage(AttributeTargets.Class)] public class ServiceNotApplicable : Attribute { diff --git a/BizHawk.Emulation.Common/Interfaces/ILinkable.cs b/BizHawk.Emulation.Common/Interfaces/ILinkable.cs new file mode 100644 index 0000000000..a2e9f3e8d3 --- /dev/null +++ b/BizHawk.Emulation.Common/Interfaces/ILinkable.cs @@ -0,0 +1,10 @@ +namespace BizHawk.Emulation.Common +{ + public interface ILinkable : ISpecializedEmulatorService + { + /// + /// Whether or not the link cable is currently connected + /// + bool LinkConnected { get; } + } +}