diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 53c12c988e..bedd659de2 100644 --- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -1252,6 +1252,7 @@ + diff --git a/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs new file mode 100644 index 0000000000..cd2e81131f --- /dev/null +++ b/BizHawk.Client.EmuHawk/tools/VirtualPads/schema/GGLSchema.cs @@ -0,0 +1,78 @@ +using System.Collections.Generic; +using System.Drawing; + +using BizHawk.Emulation.Common; + +namespace BizHawk.Client.EmuHawk +{ + [Schema("GGL")] + public class GGLSchema : IVirtualPadSchema + { + public IEnumerable GetPadSchemas(IEmulator core) + { + yield return StandardController(1); + yield return StandardController(2); + } + + private static PadSchema StandardController(int controller) + { + return new PadSchema + { + IsConsole = false, + DefaultSize = new Size(174, 90), + Buttons = new[] + { + new PadSchema.ButtonSchema + { + Name = "P" + controller + " Up", + Icon = Properties.Resources.BlueUp, + Location = new Point(14, 12), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = "P" + controller + " Down", + Icon = Properties.Resources.BlueDown, + Location = new Point(14, 56), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = "P" + controller + " Left", + Icon = Properties.Resources.Back, + Location = new Point(2, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = "P" + controller + " Right", + Icon = Properties.Resources.Forward, + Location = new Point(24, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = "P" + controller + " Start", + DisplayName = "S", + Location = new Point(134, 12), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = "P" + controller + " B1", + DisplayName = "1", + Location = new Point(122, 34), + Type = PadSchema.PadInputType.Boolean + }, + new PadSchema.ButtonSchema + { + Name = "P" + controller + " B2", + DisplayName = "2", + Location = new Point(146, 34), + Type = PadSchema.PadInputType.Boolean + } + } + }; + } + } +}