mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-21 06:03:52 +00:00
deadzone on left stick desktop
This commit is contained in:
parent
a057094ef4
commit
a551314152
1 changed files with 12 additions and 8 deletions
|
|
@ -66,16 +66,20 @@ namespace SteamController.Profiles.Predefined
|
|||
|
||||
private void EmulateScrollOnLStick(Context c)
|
||||
{
|
||||
if (c.Steam.LeftThumbX)
|
||||
{
|
||||
c.Mouse.HorizontalScroll(c.Steam.LeftThumbX.DeltaValue * Context.ThumbToWhellSensitivity);
|
||||
}
|
||||
if (c.Steam.LeftThumbY)
|
||||
{
|
||||
c.Mouse.VerticalScroll(c.Steam.LeftThumbY.DeltaValue * Context.ThumbToWhellSensitivity * (double)Settings.Default.ScrollDirection);
|
||||
//use hardwired dead zone of 5000 for desktop mode
|
||||
double dzcheck = Math.Sqrt(c.Steam.LeftThumbX.Value*c.Steam.LeftThumbX.Value + c.Steam.LeftThumbY.Value*c.Steam.LeftThumbY.Value);
|
||||
if (dzcheck > 5000) {
|
||||
if (c.Steam.LeftThumbX)
|
||||
{
|
||||
c.Mouse.HorizontalScroll(c.Steam.LeftThumbX.DeltaValue * Context.ThumbToWhellSensitivity);
|
||||
}
|
||||
if (c.Steam.LeftThumbY)
|
||||
{
|
||||
c.Mouse.VerticalScroll(c.Steam.LeftThumbY.DeltaValue * Context.ThumbToWhellSensitivity * (double)Settings.Default.ScrollDirection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void EmulateDPadArrows(Context c)
|
||||
{
|
||||
c.Keyboard[VirtualKeyCode.LEFT] = c.Steam.BtnDpadLeft;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue