Invert Y on the wire, not in the router: the panel keeps tracking the stick
InputRouter.InvertJoystickY flipped the stored axis, so the X/Y dot and readout moved opposite the physical stick. The toggle now lives on VRioDevice and negates joystick Y only while building AnalogReply: local state keeps the physical direction for every source (pad, keys, panel drags) and only the host sees the flip. Negating a full -8192 deflection lands one past the 14-bit Max, so the reply clamps it to 8191. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,13 +57,6 @@ public sealed class InputRouter
|
||||
/// <summary>A routed address went down (true) or came back up (false) — for panel highlighting.</summary>
|
||||
public event Action<int, bool>? AddressHeldChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Flip the sign of the composed joystick Y before it reaches the device.
|
||||
/// Applies to all routed sources (keys and pad) alike; panel drags write
|
||||
/// the device directly and are unaffected.
|
||||
/// </summary>
|
||||
public bool InvertJoystickY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The active bindings. Assigning releases everything currently held
|
||||
/// (keys, toggles, pad buttons) so a reload never strands a pressed input.
|
||||
@@ -223,8 +216,6 @@ public sealed class InputRouter
|
||||
if (b.Rate <= 0f)
|
||||
total += Shape(_pad.Axis(b.Source), b);
|
||||
}
|
||||
if (InvertJoystickY && axis == RioAxis.JoystickY)
|
||||
total = -total;
|
||||
total = ClampNorm(axis, total);
|
||||
|
||||
short raw = (short)Math.Round(total * RioAxisRange.Full(axis));
|
||||
|
||||
Reference in New Issue
Block a user