diff options
-rw-r--r-- | release-notes.md | 9 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/release-notes.md b/release-notes.md index af535895..78b83806 100644 --- a/release-notes.md +++ b/release-notes.md @@ -10,6 +10,15 @@ For mod developers: images). --> +## 1.13 +See [log](https://github.com/Pathoschild/SMAPI/compare/1.12...1.13). + +For players: +* SMAPI now has better draw error recovery and detects when the error is irrecoverable. + +For mod developers: +* SMAPI now logs basic context info to simplify troubleshooting. + ## 1.12 See [log](https://github.com/Pathoschild/SMAPI/compare/1.11...1.12). diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs index 7dae937b..6932af2a 100644 --- a/src/StardewModdingAPI/Framework/SGame.cs +++ b/src/StardewModdingAPI/Framework/SGame.cs @@ -967,6 +967,13 @@ namespace StardewModdingAPI.Framework } this.FailedDraws++; + // abort in known unrecoverable cases + if (Game1.toolSpriteSheet?.IsDisposed == true) + { + this.Monitor.ExitGameImmediately("the game unexpectedly disposed the tool spritesheet, so it crashed trying to draw a tool. This is a known bug in Stardew Valley 1.2.29, and there's no way to recover from it."); + return; + } + // recover sprite batch try { |