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...
This commit is contained in:
goyuken 2012-09-16 16:25:54 +00:00
parent 88fab46b21
commit 727e441bb4
3 changed files with 9 additions and 5 deletions

View File

@ -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);

View File

@ -118,7 +118,7 @@ namespace BizHawk.MultiClient
public static readonly Dictionary<string, Dictionary<string, string>> COMMANDS = new Dictionary<string, Dictionary<string, string>>()
{
{"Atari 2600 Basic Controller", new Dictionary<string, string>() {{"Reset", "r"}, {"Select", "s"}}},
{"Gameboy Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
{"Gameboy Controller", new Dictionary<string, string>() {{"Power", "P"}}},
{"Genesis 3-Button Controller", new Dictionary<string, string>() {}},
{"NES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
{"SNES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},

View File

@ -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")
{