diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-23 16:51:03 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-23 16:51:03 -0400 |
commit | 8f1379e27323f00361c1cef107cf4ab269827b16 (patch) | |
tree | efcba227ee5bced3e9c619798ad30416cf8a3134 | |
parent | 5fa13459d367bc5e3248a8b1447f4f56354e1fae (diff) | |
download | SMAPI-8f1379e27323f00361c1cef107cf4ab269827b16.tar.gz SMAPI-8f1379e27323f00361c1cef107cf4ab269827b16.tar.bz2 SMAPI-8f1379e27323f00361c1cef107cf4ab269827b16.zip |
fix rare crash when window loses focus for some players
-rw-r--r-- | release-notes.md | 1 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/release-notes.md b/release-notes.md index c654e408..9506de9c 100644 --- a/release-notes.md +++ b/release-notes.md @@ -20,6 +20,7 @@ For players: * you have Stardew Valley 1.11 or earlier (which aren't compatible); * you run `install.exe` from within the downloaded zip file. * Fixed "unknown mod" deprecation warnings by improving how SMAPI detects the mod using the event. +* Fixed rare crash when window loses focuses for a few players. For modders: * Added `Context.IsInDrawLoop` for specialised mods. 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(); |