diff --git a/.vscode/settings.json b/.vscode/settings.json index ed25459806..9ee5dd31af 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,10 @@ "frontend_driver.h": "c", "*.in": "c", "*.rh": "c", - "array": "c" + "array": "c", + "stdlib.h": "c", + "cmath": "c", + "cstdlib": "c" }, "C_Cpp.dimInactiveRegions": false, } \ No newline at end of file diff --git a/input/input_mapper.c b/input/input_mapper.c index f42c804160..b8f7931292 100644 --- a/input/input_mapper.c +++ b/input/input_mapper.c @@ -205,13 +205,13 @@ void input_mapper_poll(input_mapper_t *handle) settings->uints.input_remap_ids[i][k]; if ( - (abs(current_axis_value) > - *input_driver_get_float(INPUT_ACTION_AXIS_THRESHOLD) * 32767) && - (k != remap_axis) && + (abs(current_axis_value) > 0 && + (k != remap_axis) && (remap_axis != RARCH_UNMAPPED) - ) + )) { - if (remap_axis < RARCH_FIRST_CUSTOM_BIND) + if (remap_axis < RARCH_FIRST_CUSTOM_BIND && + abs(current_axis_value) > *input_driver_get_float(INPUT_ACTION_AXIS_THRESHOLD) * 32767) { BIT256_SET(handle->buttons[i], remap_axis); }