summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-30 21:46:05 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-30 21:46:05 -0400
commit82ad4cef0ddca024db6df6d80358e54d965538dc (patch)
tree0f495fdf6ccec205bb05885007e08b9d42ca40ce /src/SMAPI
parent6a3ff5f151e1d47033d86e7f9b1004ee405c525c (diff)
downloadSMAPI-82ad4cef0ddca024db6df6d80358e54d965538dc.tar.gz
SMAPI-82ad4cef0ddca024db6df6d80358e54d965538dc.tar.bz2
SMAPI-82ad4cef0ddca024db6df6d80358e54d965538dc.zip
fix input freeze on shipping screen (#482)
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Framework/SGame.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index a580d3eb..d9e90896 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -211,6 +211,17 @@ namespace StardewModdingAPI.Framework
try
{
/*********
+ ** Update input
+ *********/
+ // This should *always* run, even when suppressing mod events, since the game uses
+ // this too. For example, doing this after mod event suppression would prevent the
+ // user from doing anything on the overnight shipping screen.
+ SInputState previousInputState = this.Input.Clone();
+ SInputState inputState = this.Input;
+ if (this.IsActive)
+ inputState.TrueUpdate();
+
+ /*********
** Skip conditions
*********/
// SMAPI exiting, stop processing game updates
@@ -388,12 +399,8 @@ namespace StardewModdingAPI.Framework
/*********
** Input events (if window has focus)
*********/
- if (Game1.game1.IsActive)
+ if (this.IsActive)
{
- SInputState previousInputState = this.Input.Clone();
- SInputState inputState = this.Input;
- inputState.TrueUpdate();
-
// raise events
bool isChatInput = Game1.IsChatting || (Context.IsMultiplayer && Context.IsWorldReady && Game1.activeClickableMenu == null && Game1.currentMinigame == null && inputState.IsAnyDown(Game1.options.chatButton));
if (!isChatInput)