From 3bf5b75adce14ff2c2378163d2fe5f0ae9b931e4 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 28 Jun 2014 22:59:04 +0000 Subject: [PATCH] SNES - remove players 3 and 4 from controller definition since they aren't currently used, virtual pad - dynamically generate number of controllers based on controller definition --- .../tools/VirtualPads/schema/SnesSchema.cs | 7 +++++-- .../Consoles/Nintendo/SNES/LibsnesCore.cs | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs index bc1fa855f8..7e848dc99e 100644 --- a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/SnesSchema.cs @@ -11,8 +11,11 @@ namespace BizHawk.Client.EmuHawk { public IEnumerable GetPadSchemas() { - yield return StandardController(1); - yield return StandardController(2); + for (int i = 0; i < Global.Emulator.ControllerDefinition.PlayerCount; i++) + { + yield return StandardController(i); + } + yield return ConsoleButtons(); } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index 32854deb81..9deb15d2e7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -703,8 +703,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES "Reset", "Power", "P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 Select", "P1 Start", "P1 Y", "P1 X", "P1 B", "P1 A", "P1 L", "P1 R", "P2 Up", "P2 Down", "P2 Left", "P2 Right", "P2 Select", "P2 Start", "P2 Y", "P2 X", "P2 B", "P2 A", "P2 L", "P2 R", - "P3 Up", "P3 Down", "P3 Left", "P3 Right", "P3 Select", "P3 Start", "P3 Y", "P3 X", "P3 B", "P3 A", "P3 L", "P3 R", - "P4 Up", "P4 Down", "P4 Left", "P4 Right", "P4 Select", "P4 Start", "P4 Y", "P4 X", "P4 B", "P4 A", "P4 L", "P4 R", + + // adelikat: disabling these since they aren't hooked up + // "P3 Up", "P3 Down", "P3 Left", "P3 Right", "P3 Select", "P3 Start", "P3 Y", "P3 X", "P3 B", "P3 A", "P3 L", "P3 R", + // "P4 Up", "P4 Down", "P4 Left", "P4 Right", "P4 Select", "P4 Start", "P4 Y", "P4 X", "P4 B", "P4 A", "P4 L", "P4 R", } };