Davidobot / BetterJoy

Allows the Nintendo Switch Pro Controller, Joycons and SNES controller to be used with CEMU, Citra, Dolphin, Yuzu and as generic XInput
Other
3.85k stars 341 forks source link

[BUG]when extraGyroFeature == "mouse", slow movement and no response #959

Open lcings opened 2 years ago

lcings commented 2 years ago

Describe the bug I moved the handle very slow,some data was drop!!!

Expected behavior dx = (int)(GyroMouseSensitivityX (gyr_g.Z dt)); When gyr_g.Z is very small,dx will set to 0, Actually,

Here is a fix: float gyr_sum_y = 0; float gyr_sum_z = 0; image

When the current moving distance is less than 1.0, we first add to sum, where gyr sum y > 1.0, we use this sum as input to solve the problem of slow movement and no response. GyroMouseNoise: very small value will be set to suppress the drift of the sensor,such as 0.05