summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-02-11 20:56:25 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-02-11 20:56:25 -0500
commit4a1174cd5086ac615b9218384853a6ad2831b603 (patch)
tree82d5d43f4a2a155db6159531a0902e84cebce313
parent4da9e954df3846d01aa0536f4e8143466a1d62f3 (diff)
downloadSMAPI-4a1174cd5086ac615b9218384853a6ad2831b603.tar.gz
SMAPI-4a1174cd5086ac615b9218384853a6ad2831b603.tar.bz2
SMAPI-4a1174cd5086ac615b9218384853a6ad2831b603.zip
fix thumbstick input overrides
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Framework/Input/GamePadStateBuilder.cs8
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;