From 727e441bb4a863e0deb81c7f80c8edc3c3f23fe7 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sun, 16 Sep 2012 16:25:54 +0000 Subject: [PATCH] change gameboy control "Reset" virtual button to "Power" virtual button some consoles have both "Reset" and "Power" notions, so this is to be more consistent i'm not sure that i got all references... --- BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs | 4 ++-- BizHawk.MultiClient/Global.cs | 2 +- BizHawk.MultiClient/movie/InputAdapters.cs | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs index 1f99a24019..103bf74416 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -64,7 +64,7 @@ namespace BizHawk.Emulation.Consoles.GB Name = "Gameboy Controller", BoolButtons = { - "Up", "Down", "Left", "Right", "A", "B", "Select", "Start", "Reset" + "Up", "Down", "Left", "Right", "A", "B", "Select", "Start", "Power" } }; @@ -124,7 +124,7 @@ namespace BizHawk.Emulation.Consoles.GB foreach (var r in MemoryRefreshers) r.RefreshWrite(); - if (Controller["Reset"]) + if (Controller["Power"]) LibGambatte.gambatte_reset(GambatteState); LibGambatte.gambatte_runfor(GambatteState, VideoBuffer, 160, soundbuff, ref nsamp); diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index 76b8b2b4d5..601c1d9705 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -118,7 +118,7 @@ namespace BizHawk.MultiClient public static readonly Dictionary> COMMANDS = new Dictionary>() { {"Atari 2600 Basic Controller", new Dictionary() {{"Reset", "r"}, {"Select", "s"}}}, - {"Gameboy Controller", new Dictionary() {{"Reset", "r"}}}, + {"Gameboy Controller", new Dictionary() {{"Power", "P"}}}, {"Genesis 3-Button Controller", new Dictionary() {}}, {"NES Controller", new Dictionary() {{"Reset", "r"}}}, {"SNES Controller", new Dictionary() {{"Reset", "r"}}}, diff --git a/BizHawk.MultiClient/movie/InputAdapters.cs b/BizHawk.MultiClient/movie/InputAdapters.cs index 0d026eec8d..5c927c7a78 100644 --- a/BizHawk.MultiClient/movie/InputAdapters.cs +++ b/BizHawk.MultiClient/movie/InputAdapters.cs @@ -406,10 +406,14 @@ namespace BizHawk.MultiClient input.Append(IsBasePressed("Reset") ? "r" : "."); input.Append(IsBasePressed("Select") ? "s" : "."); } - if (ControlType == "NES Controller" || ControlType == "Gameboy Controller") + if (ControlType == "NES Controller") { input.Append(IsBasePressed("Reset") ? Global.COMMANDS[ControlType]["Reset"] : "."); } + if (ControlType == "Gameboy Controller") + { + input.Append(IsBasePressed("Power") ? Global.COMMANDS[ControlType]["Power"] : "."); + } if (ControlType != "SMS Controller" && ControlType != "TI83 Controller") { input.Append("|"); @@ -648,7 +652,7 @@ namespace BizHawk.MultiClient if (ControlType == "Gameboy Controller") { if (mnemonic.Length < 2) return; - Force("Reset", mnemonic[1] != '.'); + Force("Power", mnemonic[1] != '.'); } if (ControlType == "SMS Controller" || ControlType == "TI83 Controller") {