mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 15:05:59 +00:00
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:
parent
7c9a38e0f3
commit
57cc7037f6
5 changed files with 59 additions and 35 deletions
|
|
@ -420,7 +420,8 @@ std::unordered_map<u64, u16> mm_joystick_handler::GetButtonValues(const JOYINFOE
|
|||
|
||||
auto add_axis_value = [&](DWORD axis, UINT min, UINT max, u64 pos, u64 neg)
|
||||
{
|
||||
const float val = ScaledInput2(axis, min, max);
|
||||
constexpr int deadzone = 0;
|
||||
const float val = ScaledAxisInput(axis, min, max, deadzone);
|
||||
if (val < 0)
|
||||
{
|
||||
button_values.emplace(pos, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue