Emulator Issues #12927
openUnwanted analog input scaling in Dolphin 5.0-16380
0%
Description
Hi, the following commit recently made it into the beta build of Dolphin:
https://github.com/dolphin-emu/dolphin/commit/c95c43bfb6f28861380de41b9c1e7f45ae6243e4
This causes the B0XX controller (and other USB controllers) to produce incorrect negative values on Dolphin.
The change itself is consistent with Dolphin's internal input handling, but causes unexpected results because the various input backends convert analog inputs to floats in an asymmetrical way.
Examples:
https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp#L153
https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp#L127
This used to be counteracted for controllers with 8 bit analog inputs by the asymmetrical conversion from float back to u8:
[0, 128, 255] -> [-1.0, 0.0, 1.0] -> [0, 128, 255]
But this is now:
[0, 128, 255] -> [-1.0, 0.0, 1.0] -> [1, 128, 255]
This is important for GameCube controller alternatives like the B0XX that provide USB support for easy use on Dolphin and expect the game to receive unaltered analog coordinates.