From 50ee8ecf1e60d4d63c6773e0d351946d48256faa Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 1 May 2020 17:04:25 -0400 Subject: [PATCH] increase threshold of opentk gamepad (and joystick) analog -> dpad conversion. previously 12% wasn't even enough for an ANALOG DEADZONE (my joystick idles outside that range routinely), let alone a firm direction press. The old xinput gamepad threshold for this was ~60% so I made opentk match it fixes #1961 --- BizHawk.Client.EmuHawk/Input/OTK_Gamepad.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BizHawk.Client.EmuHawk/Input/OTK_Gamepad.cs b/BizHawk.Client.EmuHawk/Input/OTK_Gamepad.cs index cca48c1d04..c19c7983e8 100644 --- a/BizHawk.Client.EmuHawk/Input/OTK_Gamepad.cs +++ b/BizHawk.Client.EmuHawk/Input/OTK_Gamepad.cs @@ -256,8 +256,8 @@ namespace BizHawk.Client.EmuHawk { // OpenTK's GetAxis returns float values (as opposed to the shorts of SlimDX) const float ConversionFactor = 1.0f / short.MaxValue; - const float dzp = (short)4000 * ConversionFactor; - const float dzn = (short)-4000 * ConversionFactor; + const float dzp = 20000 * ConversionFactor; + const float dzn = -20000 * ConversionFactor; //const float dzt = 0.6f; // axis @@ -317,8 +317,8 @@ namespace BizHawk.Client.EmuHawk { // OpenTK's ThumbSticks contain float values (as opposed to the shorts of SlimDX) const float ConversionFactor = 1.0f / short.MaxValue; - const float dzp = (short)4000 * ConversionFactor; - const float dzn = (short)-4000 * ConversionFactor; + const float dzp = 20000 * ConversionFactor; + const float dzn = -20000 * ConversionFactor; const float dzt = 0.6f; // buttons