diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-03-24 19:16:51 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-03-24 19:16:51 -0400 |
commit | 68def4aa8a0a7909948849fc7be971eba05b6bb2 (patch) | |
tree | 2ddd996d2076d83eb98327962b4c0535d6c1237d | |
parent | 93475bab7fe692773350e227e1eae55c567ae8bf (diff) | |
download | SMAPI-68def4aa8a0a7909948849fc7be971eba05b6bb2.tar.gz SMAPI-68def4aa8a0a7909948849fc7be971eba05b6bb2.tar.bz2 SMAPI-68def4aa8a0a7909948849fc7be971eba05b6bb2.zip |
fix mouse input suppression broken in SMAPI 3.4 (#705)
-rw-r--r-- | docs/release-notes.md | 3 | ||||
-rw-r--r-- | src/SMAPI/Framework/Input/MouseStateBuilder.cs | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 7474cc32..55e867d1 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -3,7 +3,8 @@ # Release notes ## Upcoming release * For modders: - * Fixed asset changes not propagating to NPCs in an event (e.g. wedding sprites). + * Asset changes now propagate to NPCs in an event (e.g. wedding sprites). + * Fixed mouse input suppression not working in SMAPI 3.4. ## 3.4 Released 22 March 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI/Framework/Input/MouseStateBuilder.cs b/src/SMAPI/Framework/Input/MouseStateBuilder.cs index cff3e05e..59956feb 100644 --- a/src/SMAPI/Framework/Input/MouseStateBuilder.cs +++ b/src/SMAPI/Framework/Input/MouseStateBuilder.cs @@ -66,9 +66,11 @@ namespace StardewModdingAPI.Framework.Input { foreach (var pair in overrides) { - bool isDown = pair.Value.IsDown(); if (this.ButtonStates.ContainsKey(pair.Key)) - this.ButtonStates[pair.Key] = isDown ? ButtonState.Pressed : ButtonState.Released; + { + this.State = null; + this.ButtonStates[pair.Key] = pair.Value.IsDown() ? ButtonState.Pressed : ButtonState.Released; + } } return this; |