Merge pull request #9851 from rsn8887/master

Fix radial analog deadzone scaling
This commit is contained in:
Twinaphex 2019-12-13 20:32:41 +01:00 committed by GitHub
commit ac318f2c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13962,7 +13962,7 @@ static int16_t input_joypad_axis(const input_device_driver_t *drv,
/* due to the way normal_mag is calculated differently for buttons and
* sticks, this results in either a radial scaled deadzone for sticks
* or linear scaled deadzone for analog buttons */
val = val * MIN(1.0f,((normal_mag - input_analog_deadzone)
val = val * MAX(1.0f,(1.0f / normal_mag)) * MIN(1.0f,((normal_mag - input_analog_deadzone)
/ (1.0f - input_analog_deadzone)));
}