# HG changeset patch # User Michael Pavone # Date 1680503901 25200 # Node ID ab3d8759da08400f6965d7982981a14bce972617 # Parent 1c7329ac7f3fe6d03462081db91c5667e8dac2a4 Slightly more reasonable threshold value for axes during mapping. Still pretty broken though diff -r 1c7329ac7f3f -r ab3d8759da08 nuklear_ui/blastem_nuklear.c --- 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; }