# HG changeset patch # User Michael Pavone # Date 1606288525 28800 # Node ID 380bc5d4a2cfd9a64c302b96f3ba48f2a4f413fe # Parent 270a4c875e0a8749944f73e9adbb605978d81806 Fix format of axis mapping strings for axes that map to a d-pad diff -r 270a4c875e0a -r 380bc5d4a2cf nuklear_ui/blastem_nuklear.c --- a/nuklear_ui/blastem_nuklear.c Tue Nov 24 20:23:38 2020 -0800 +++ b/nuklear_ui/blastem_nuklear.c Tue Nov 24 23:15:25 2020 -0800 @@ -1261,14 +1261,14 @@ )) { if (current_button <= SDL_CONTROLLER_BUTTON_B || axis_moved != button_a_axis) { start_mapping(); + if (current_button >= SDL_CONTROLLER_BUTTON_DPAD_UP) { + mapping_string[mapping_pos++] = axis_value >= 0 ? '+' : '-'; + } mapping_string[mapping_pos++] = 'a'; if (axis_moved > 9) { mapping_string[mapping_pos++] = '0' + axis_moved / 10; } mapping_string[mapping_pos++] = '0' + axis_moved % 10; - if (current_button >= SDL_CONTROLLER_BUTTON_DPAD_UP) { - mapping_string[mapping_pos++] = axis_value >= 0 ? '+' : '-'; - } last_axis = axis_moved; last_axis_value = axis_value; }