From 4a1174cd5086ac615b9218384853a6ad2831b603 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 11 Feb 2022 20:56:25 -0500 Subject: fix thumbstick input overrides --- docs/release-notes.md | 1 + src/SMAPI/Framework/Input/GamePadStateBuilder.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 585644ef..18187e49 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,7 @@ * For mod authors: * The `SDate` constructor is no longer case-sensitive for season names. + * Fixed issue where suppressing `[Left|Right]Thumbstick[Down|Left]` keys would suppress the opposite direction instead. * For console commands: * Fixed `player_add` with Journal Scraps and Secret Notes. diff --git a/src/SMAPI/Framework/Input/GamePadStateBuilder.cs b/src/SMAPI/Framework/Input/GamePadStateBuilder.cs index b0bb7f80..3a99214f 100644 --- a/src/SMAPI/Framework/Input/GamePadStateBuilder.cs +++ b/src/SMAPI/Framework/Input/GamePadStateBuilder.cs @@ -104,10 +104,10 @@ namespace StardewModdingAPI.Framework.Input this.LeftStickPos.Y = isDown ? 1 : 0; break; case SButton.LeftThumbstickDown: - this.LeftStickPos.Y = isDown ? 1 : 0; + this.LeftStickPos.Y = isDown ? -1 : 0; break; case SButton.LeftThumbstickLeft: - this.LeftStickPos.X = isDown ? 1 : 0; + this.LeftStickPos.X = isDown ? -1 : 0; break; case SButton.LeftThumbstickRight: this.LeftStickPos.X = isDown ? 1 : 0; @@ -118,10 +118,10 @@ namespace StardewModdingAPI.Framework.Input this.RightStickPos.Y = isDown ? 1 : 0; break; case SButton.RightThumbstickDown: - this.RightStickPos.Y = isDown ? 1 : 0; + this.RightStickPos.Y = isDown ? -1 : 0; break; case SButton.RightThumbstickLeft: - this.RightStickPos.X = isDown ? 1 : 0; + this.RightStickPos.X = isDown ? -1 : 0; break; case SButton.RightThumbstickRight: this.RightStickPos.X = isDown ? 1 : 0; -- cgit