summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-23 16:51:03 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-23 16:51:03 -0400
commit8f1379e27323f00361c1cef107cf4ab269827b16 (patch)
treeefcba227ee5bced3e9c619798ad30416cf8a3134 /src
parent5fa13459d367bc5e3248a8b1447f4f56354e1fae (diff)
downloadSMAPI-8f1379e27323f00361c1cef107cf4ab269827b16.tar.gz
SMAPI-8f1379e27323f00361c1cef107cf4ab269827b16.tar.bz2
SMAPI-8f1379e27323f00361c1cef107cf4ab269827b16.zip
fix rare crash when window loses focus for some players
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI/Framework/SGame.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs
index 3d421a37..05ef9626 100644
--- a/src/StardewModdingAPI/Framework/SGame.cs
+++ b/src/StardewModdingAPI/Framework/SGame.cs
@@ -350,8 +350,9 @@ namespace StardewModdingAPI.Framework
}
/*********
- ** Input events
+ ** Input events (if window has focus)
*********/
+ if (Game1.game1.IsActive)
{
// get latest state
this.KStateNow = Keyboard.GetState();