Add soft reset / hard reset to nymacores

most of the work had already been done, just didn't wire it up in C#land
This commit is contained in:
nattthebear 2020-05-27 16:17:05 -04:00
parent 287e78a5a9
commit 7e53ef69ed
2 changed files with 12 additions and 2 deletions

View File

@ -39,7 +39,13 @@ namespace BizHawk.Emulation.Cores.Waterbox
{
var ret = new ControllerDefinition
{
Name = "Mednafen Controller"
Name = "Mednafen Controller",
BoolButtons = { "Power", "Reset" },
CategoryLabels =
{
{ "Power", "System" },
{ "Reset", "System" },
}
};
var finalDevices = new List<string>();

View File

@ -144,7 +144,11 @@ namespace BizHawk.Emulation.Cores.Waterbox
{
SkipRendering = (short)(render ? 0 : 1),
SkipSoundening =(short)(rendersound ? 0 : 1),
Command = LibNymaCore.CommandType.NONE,
Command = controller.IsPressed("Power")
? LibNymaCore.CommandType.POWER
: controller.IsPressed("Reset")
? LibNymaCore.CommandType.RESET
: LibNymaCore.CommandType.NONE,
InputPortData = (byte*)_frameAdvanceInputLock.AddrOfPinnedObject()
};
return ret;