From 7f83f311f963932836c7347967dffc7c20c7ff15 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Sat, 13 Jun 2020 17:00:59 -0400 Subject: [PATCH] saturnus - wire up the needed analogs for 3d controller --- .../Waterbox/NymaCore.Controller.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs index 056f4169bb..64de5f8083 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Controller.cs @@ -224,6 +224,21 @@ namespace BizHawk.Emulation.Cores.Waterbox // ret.AxisRanges.Add(new ControllerDefinition.AxisRange(0, ????, ????, true)); // break; } + case InputType.ButtonAnalog: + { + ret.AxisControls.Add(name); + ret.CategoryLabels[name] = category; + ret.AxisRanges.Add(new ControllerDefinition.AxisRange( + 0, 0, 0xffff, false + )); + _thunks.Add((c, b) => + { + var val = c.AxisValue(name); + b[byteStart] = (byte)val; + b[byteStart + 1] = (byte)(val >> 8); + }); + break; + } // TODO: wire up statuses to something (not controller, of course) default: {