Addition to analog stick menu navigation (#14584)

This commit is contained in:
sonninnos 2022-11-03 21:28:24 +02:00 committed by GitHub
parent 5587ab4f8b
commit d4eef18f18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5599,7 +5599,13 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
unsigned j = x_plus + 3;
/* Inherit joyaxis from analogs. */
for (k = RETRO_DEVICE_ID_JOYPAD_UP; k <= RETRO_DEVICE_ID_JOYPAD_RIGHT; k++)
(general_binds)[k].joyaxis = (general_binds)[j--].joyaxis;
{
if ((general_binds)[j].joyaxis != AXIS_NONE &&
((float)abs(joypad->axis(port, (uint32_t)(general_binds)[j].joyaxis))
/ 0x8000) > joypad_info.axis_threshold)
(general_binds)[k].joyaxis = (general_binds)[j].joyaxis;
j--;
}
}
}
}