mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-02-07 08:04:21 +01:00
Fix LT/RT to trigger up to 50%, instead of 100%
This commit is contained in:
parent
0ee7a3ba43
commit
11e056904d
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue