mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2025-12-06 07:12:01 +01:00
FLM: Added debug setting to enable/disable faux lizard mode.
This commit is contained in:
parent
d7db9bea8d
commit
d232aef11d
|
|
@ -142,7 +142,7 @@ namespace SteamController.Profiles.Default
|
|||
);
|
||||
}
|
||||
|
||||
if (!c.Steam.LizardButtons && !c.Steam.LizardMouse)
|
||||
if (SettingsDebug.Default.FauxLizardMode && !c.Steam.LizardButtons && !c.Steam.LizardMouse)
|
||||
{
|
||||
// Send haptic for pad presses
|
||||
if (c.Steam.BtnLPadPress.Pressed() || c.Steam.BtnLPadPress.JustPressed())
|
||||
|
|
@ -200,14 +200,16 @@ namespace SteamController.Profiles.Default
|
|||
c.Mouse[Devices.MouseController.Button.Left] = c.Steam.BtnRPadPress;
|
||||
}
|
||||
|
||||
c.Mouse.MoveByFauxLizard(
|
||||
c.Steam.RPadX.GetDeltaValue(Context.PadToMouseSensitivity, Devices.DeltaValueMode.Delta, 10),
|
||||
-c.Steam.RPadY.GetDeltaValue(Context.PadToMouseSensitivity, Devices.DeltaValueMode.Delta, 10),
|
||||
c.Steam.BtnRPadTouch?.LastValue ?? false
|
||||
);
|
||||
bool simpleEmulation = true;
|
||||
|
||||
if (!c.Steam.LizardButtons && !c.Steam.LizardMouse)
|
||||
if (SettingsDebug.Default.FauxLizardMode && !c.Steam.LizardButtons && !c.Steam.LizardMouse)
|
||||
{
|
||||
c.Mouse.MoveByFauxLizard(
|
||||
c.Steam.RPadX.GetDeltaValue(Context.PadToMouseSensitivity, Devices.DeltaValueMode.Delta, 10),
|
||||
-c.Steam.RPadY.GetDeltaValue(Context.PadToMouseSensitivity, Devices.DeltaValueMode.Delta, 10),
|
||||
c.Steam.BtnRPadTouch?.LastValue ?? false
|
||||
);
|
||||
|
||||
// Send haptic for pad presses
|
||||
if (c.Steam.BtnRPadPress.Pressed() || c.Steam.BtnRPadPress.JustPressed())
|
||||
{
|
||||
|
|
@ -229,6 +231,17 @@ namespace SteamController.Profiles.Default
|
|||
c.Steam.BtnRPadTouch?.LastValue ?? false
|
||||
))
|
||||
c.Steam.SendHaptic(HapticPad.Right, HapticStyle.Weak, 5);
|
||||
|
||||
// We do not want simple emulation after faux lizard emulation
|
||||
simpleEmulation = false;
|
||||
}
|
||||
|
||||
if (simpleEmulation && (c.Steam.RPadX || c.Steam.RPadY))
|
||||
{
|
||||
c.Mouse.MoveBy(
|
||||
c.Steam.RPadX.GetDeltaValue(Context.PadToMouseSensitivity, Devices.DeltaValueMode.Delta, 10),
|
||||
-c.Steam.RPadY.GetDeltaValue(Context.PadToMouseSensitivity, Devices.DeltaValueMode.Delta, 10)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,13 @@ namespace SteamController
|
|||
set { Set("LizardMouse", value); }
|
||||
}
|
||||
|
||||
[Description("Emulate Lizard controls in software. LizardButtons and LizardMouse must be disabled for this to take effect.")]
|
||||
public bool FauxLizardMode
|
||||
{
|
||||
get { return Get<bool>("FauxLizardMode", false); }
|
||||
set { Set("FauxLizardMode", value); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue