Fix input bind hold when every axis does not rest on 0 (#16256)

This commit is contained in:
sonninnos 2024-02-19 21:12:54 +02:00 committed by GitHub
parent 25c15834c3
commit 3365f9b86e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1556,7 +1556,8 @@ static bool menu_input_key_bind_poll_find_hold_pad(
/* Axes are a bit tricky ... */
for (a = 0; a < MENU_MAX_AXES; a++)
{
if (abs(n->axes[a]) >= 20000)
if ( abs(n->axes[a]) >= 20000
&& n->axes[a] != new_state->axis_state[p].rested_axes[a])
{
/* Take care of case where axis rests on +/- 0x7fff
* (e.g. 360 controller on Linux) */