only apply deadzone on analog to digital remapping, not analog to analog

This commit is contained in:
radius 2018-05-27 11:58:52 -05:00
parent ecedf8b995
commit c2c5265916
2 changed files with 9 additions and 6 deletions

View File

@ -13,7 +13,10 @@
"frontend_driver.h": "c", "frontend_driver.h": "c",
"*.in": "c", "*.in": "c",
"*.rh": "c", "*.rh": "c",
"array": "c" "array": "c",
"stdlib.h": "c",
"cmath": "c",
"cstdlib": "c"
}, },
"C_Cpp.dimInactiveRegions": false, "C_Cpp.dimInactiveRegions": false,
} }

View File

@ -205,13 +205,13 @@ void input_mapper_poll(input_mapper_t *handle)
settings->uints.input_remap_ids[i][k]; settings->uints.input_remap_ids[i][k];
if ( if (
(abs(current_axis_value) > (abs(current_axis_value) > 0 &&
*input_driver_get_float(INPUT_ACTION_AXIS_THRESHOLD) * 32767) && (k != remap_axis) &&
(k != remap_axis) &&
(remap_axis != RARCH_UNMAPPED) (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); BIT256_SET(handle->buttons[i], remap_axis);
} }