Invert-Y input toggle; git-stamped version in the window title

- InputRouter.InvertJoystickY flips the composed joystick Y (keys and
  pad alike) before wire scaling; panel drags write the device directly
  and stay untouched. New "Invert joystick Y" checkbox in the Input
  group, default on.
- StampGitVersion target bakes "YYYY.MM.DD (shortsha)" of HEAD into
  InformationalVersion; the title shows it via Application.ProductVersion
  so a running build can be matched to its vYYYY.MM.DD release tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-06 18:46:02 -05:00
co-authored by Claude Fable 5
parent f77cd55b11
commit 41f6ef364d
5 changed files with 72 additions and 13 deletions
+20
View File
@@ -191,6 +191,26 @@ public class InputRouterTests
Assert.Equal(0, _device.GetAxis(RioAxis.JoystickY));
}
[Fact]
public void InvertJoystickY_flips_the_composed_value_for_all_sources()
{
UseProfile("key Up axis JoystickY deflect 1\npadaxis LeftStickY axis JoystickY");
_router.InvertJoystickY = true;
_router.KeyDown("Up");
_router.Tick(0.016);
Assert.Equal(-RioAxisRange.JoystickExtent, _device.GetAxis(RioAxis.JoystickY));
_router.KeyUp("Up");
_router.SetPadState(new PadState(PadButtons.None, 0, 0.5f, 0, 0, 0, 0));
_router.Tick(0.016);
Assert.Equal(-RioAxisRange.JoystickExtent / 2, _device.GetAxis(RioAxis.JoystickY));
_router.InvertJoystickY = false; // toggling back re-sends the upright value
_router.Tick(0.016);
Assert.Equal(RioAxisRange.JoystickExtent / 2, _device.GetAxis(RioAxis.JoystickY));
}
[Fact]
public void Rate_key_walks_the_throttle_and_position_sticks()
{