FLM: Added debug setting to enable/disable faux lizard mode.

This commit is contained in:
General4878 2025-10-05 16:20:04 +02:00
parent d7db9bea8d
commit d232aef11d
2 changed files with 27 additions and 7 deletions

View file

@ -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)
);
}
}
}

View file

@ -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 "";