From c8a0b6c323790623c7b62b34ed0708fc98054657 Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 15 Jun 2020 13:29:31 -0500 Subject: [PATCH] virtual pads - pce, pcfx - add console buttons --- .../tools/VirtualPads/schema/PceSchema.cs | 15 +++++++++++++++ .../tools/VirtualPads/schema/PcfxSchema.cs | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs index 3327a8207e..5d3736c0de 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PceSchema.cs @@ -109,6 +109,8 @@ namespace BizHawk.Client.EmuHawk MessageBox.Show($"Controller type {device} not supported yet."); } } + + yield return ConsoleButtons(); } private static PadSchema StandardController(int controller) @@ -163,5 +165,18 @@ namespace BizHawk.Client.EmuHawk } }; } + + private static PadSchema ConsoleButtons() + { + return new ConsoleSchema + { + Size = new Size(150, 50), + Buttons = new[] + { + new ButtonSchema(10, 15, "Reset"), + new ButtonSchema(58, 15, "Power") + } + }; + } } } diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs index fcf05d66a1..658d703017 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/PcfxSchema.cs @@ -36,6 +36,8 @@ namespace BizHawk.Client.EmuHawk MessageBox.Show($"Controller type {device} not supported yet."); } } + + yield return ConsoleButtons(); } private static PadSchema StandardController(int controller) @@ -90,5 +92,18 @@ namespace BizHawk.Client.EmuHawk } }; } + + private static PadSchema ConsoleButtons() + { + return new ConsoleSchema + { + Size = new Size(150, 50), + Buttons = new[] + { + new ButtonSchema(10, 15, "Reset"), + new ButtonSchema(58, 15, "Power") + } + }; + } } }