From 13a5e9d102c8bd8ab4b4d1ed67198a9121364906 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Sat, 13 Jun 2020 16:45:06 -0400 Subject: [PATCH] faust - hide ports 3-5 and/or 6-8 depending on multitap settings --- .../Consoles/Nintendo/Faust/Faust.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs index d1b89af382..60e0919aca 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs @@ -19,6 +19,22 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Faust DoInit(game, rom, null, "faust.wbx", extension, deterministic); } + protected override HashSet ComputeHiddenPorts() + { + var devCount = 8; + if (SettingsQuery("snes_faust.input.sport1.multitap") != "1") + devCount -= 3; + if (SettingsQuery("snes_faust.input.sport2.multitap") != "1") + devCount -= 3; + var ret = new HashSet(); + for (var i = 1; i <= 8; i++) + { + if (i > devCount) + ret.Add($"port{i}"); + } + return ret; + } + protected override IDictionary SettingsOverrides { get; } = new Dictionary { // { "snes_faust.renderer", null },