Use a better default deadzone value for Linux. Fixes uncontrollable menus

This commit is contained in:
nashmuhandes 2024-02-02 15:59:29 +08:00 committed by Christoph Oelckers
parent 989123b5f8
commit f6bdc02a8a

View file

@ -38,6 +38,8 @@
#include "m_joy.h"
#include "keydef.h"
#define DEFAULT_DEADZONE 0.25f;
// Very small deadzone so that floating point magic doesn't happen
#define MIN_DEADZONE 0.000001f
@ -143,7 +145,7 @@ public:
info.Name.Format("Axis %d", i+1);
else
info.Name.Format("Hat %d (%c)", (i-NumAxes)/2 + 1, (i-NumAxes)%2 == 0 ? 'x' : 'y');
info.DeadZone = MIN_DEADZONE;
info.DeadZone = DEFAULT_DEADZONE;
info.Multiplier = 1.0f;
info.Value = 0.0;
info.ButtonValue = 0;