Hotkeys for toggling Gameboy

This commit is contained in:
adelikat 2017-06-04 14:14:06 -05:00
parent 8c3c23075a
commit 55bf697223
2 changed files with 26 additions and 0 deletions

View File

@ -248,6 +248,9 @@ namespace BizHawk.Client.Common
Bind("SNES", "Toggle OBJ 3"), Bind("SNES", "Toggle OBJ 3"),
Bind("SNES", "Toggle OBJ 4"), Bind("SNES", "Toggle OBJ 4"),
Bind("GB", "GB Toggle BG"),
Bind("GB", "GB Toggle Obj"),
Bind("Analog", "Y Up Small", toolTip: "For Virtual Pad"), Bind("Analog", "Y Up Small", toolTip: "For Virtual Pad"),
Bind("Analog", "Y Up Large", toolTip: "For Virtual Pad"), Bind("Analog", "Y Up Large", toolTip: "For Virtual Pad"),
Bind("Analog", "Y Down Small", toolTip: "For Virtual Pad"), Bind("Analog", "Y Down Small", toolTip: "For Virtual Pad"),

View File

@ -2,6 +2,7 @@
using BizHawk.Client.Common; using BizHawk.Client.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {
@ -633,6 +634,28 @@ namespace BizHawk.Client.EmuHawk
SNES_ToggleOBJ4(); SNES_ToggleOBJ4();
break; break;
// GB
case "GB Toggle BG":
if (Emulator is Gameboy)
{
var s = ((Gameboy)Emulator).GetSettings();
s.DisplayBG ^= true;
((Gameboy)Emulator).PutSettings(s);
GlobalWin.OSD.AddMessage("BG toggled " + (s.DisplayBG ? "on" : "off"));
}
break;
case "GB Toggle Obj":
if (Emulator is Gameboy)
{
var s = ((Gameboy)Emulator).GetSettings();
s.DisplayOBJ ^= true;
((Gameboy)Emulator).PutSettings(s);
GlobalWin.OSD.AddMessage("OBJ toggled " + (s.DisplayBG ? "on" : "off"));
}
break;
// Analog // Analog
case "Y Up Small": case "Y Up Small":
GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, Global.Config.Analog_SmallChange); GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, Global.Config.Analog_SmallChange);