Fix LT/RT to trigger up to 50%, instead of 100%

This commit is contained in:
Kamil Trzciński 2022-11-27 00:00:59 +01:00
parent 0ee7a3ba43
commit 11e056904d
2 changed files with 3 additions and 5 deletions

View file

@ -9,6 +9,7 @@
- Try to disable usage of Kernel Drivers (when FAN in Default, and OSD Kernel Drivers are disabled)
to allow apps to work with Anti-Cheat detections
- Hide `Use Lizard Mouse/Buttons` as it does something different than people are used to
- Fix `LT/RT` to trigger up to 50%, instead of 100%
## 0.4.x

View file

@ -178,11 +178,8 @@ namespace SteamController.Devices
public void SetSliderValue(Xbox360Slider slider, short value)
{
// rescale from -32767..32768 to 0..255
int result = value;
result -= short.MinValue;
result *= byte.MaxValue;
result /= ushort.MaxValue;
// rescale from 0..32767 to 0..255
int result = Math.Clamp(value, (short)0, short.MaxValue) * byte.MaxValue / short.MaxValue;
device?.SetSliderValue(slider, (byte)result);
submitReport = true;
}