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",
"*.in": "c",
"*.rh": "c",
"array": "c"
"array": "c",
"stdlib.h": "c",
"cmath": "c",
"cstdlib": "c"
},
"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];
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);
}