Hotkeys for toggling Gameboy

This commit is contained in:
adelikat 2017-06-04 14:14:06 -05:00
parent caf3a7834d
commit 05bc1d34fd
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 4"),
Bind("GB", "GB Toggle BG"),
Bind("GB", "GB Toggle Obj"),
Bind("Analog", "Y Up Small", toolTip: "For Virtual Pad"),
Bind("Analog", "Y Up Large", 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.Emulation.Common.IEmulatorExtensions;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
namespace BizHawk.Client.EmuHawk
{
@ -633,6 +634,28 @@ namespace BizHawk.Client.EmuHawk
SNES_ToggleOBJ4();
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
case "Y Up Small":
GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, Global.Config.Analog_SmallChange);