Mercurial > repos > blastem
changeset 2319:ab3d8759da08
Slightly more reasonable threshold value for axes during mapping. Still pretty broken though
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 02 Apr 2023 23:38:21 -0700 |
parents | 1c7329ac7f3f |
children | 8016dbb0fcde |
files | nuklear_ui/blastem_nuklear.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/nuklear_ui/blastem_nuklear.c Sun Apr 02 23:36:30 2023 -0700 +++ b/nuklear_ui/blastem_nuklear.c Sun Apr 02 23:38:21 2023 -0700 @@ -1289,7 +1289,7 @@ last_hat = hat_moved; last_hat_value = hat_value; - } else if (axis_moved >= 0 && abs(axis_value) > 1000 && ( + } else if (axis_moved >= 0 && abs(axis_value) > 4000 && ( axis_moved != last_axis || ( axis_value/abs(axis_value) != last_axis_value/abs(axis_value) && current_button >= SDL_CONTROLLER_BUTTON_DPAD_UP ) @@ -2443,7 +2443,7 @@ hat_value = event->jhat.value; } else if (event->type == SDL_JOYAXISMOTION) { - if (event->jaxis.axis == axis_moved || abs(event->jaxis.value) > abs(axis_value) || abs(event->jaxis.value) > 1000) { + if (event->jaxis.axis == axis_moved || abs(event->jaxis.value) > abs(axis_value) || abs(event->jaxis.value) > 4000) { axis_moved = event->jaxis.axis; axis_value = event->jaxis.value; }