From 77e3f9acb3df665d0036f5c1bb3fa25c832bc9b6 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Sat, 13 Jun 2020 16:53:46 -0400 Subject: [PATCH] saturn - hide unavailable ports depending on multitap One slight issue is that the bulitin smpc reset is always "player 13", but that's not enough of an issue for me to care --- .../Consoles/Sega/Saturn/Saturnus.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs index 906dbf3074..e68c4cafea 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs @@ -57,5 +57,21 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn protected override ISet NonSyncSettingNames { get; } = new HashSet { }; + + protected override HashSet ComputeHiddenPorts() + { + var devCount = 12; + if (SettingsQuery("ss.input.sport1.multitap") != "1") + devCount -= 5; + if (SettingsQuery("ss.input.sport2.multitap") != "1") + devCount -= 5; + var ret = new HashSet(); + for (var i = 1; i <= 12; i++) + { + if (i > devCount) + ret.Add($"port{i}"); + } + return ret; + } } }