input/evdev: handle flatness deadzone value

This may fix issues with sticky axis on evdev.
Also refactors some redundant axis scaling functions.
This commit is contained in:
Megamouse 2023-12-11 22:03:40 +01:00
parent 7c9a38e0f3
commit 57cc7037f6
5 changed files with 59 additions and 35 deletions

View file

@ -371,6 +371,7 @@ class evdev_joystick_handler final : public PadHandlerBase
bool is_trigger{};
int min{};
int max{};
int flat{};
};
struct EvdevDevice : public PadDevice