diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-08-28 20:03:12 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-08-28 20:03:12 -0400 |
commit | a1e1b7d10393dc23fa306ef03e392aa03e0b9ee1 (patch) | |
tree | 5b0d2babff8b223a05d9abff6a0137b8bf23dd3c /src/SMAPI | |
parent | e57fc0eb15ea3976072949453a831d493b9225db (diff) | |
download | SMAPI-a1e1b7d10393dc23fa306ef03e392aa03e0b9ee1.tar.gz SMAPI-a1e1b7d10393dc23fa306ef03e392aa03e0b9ee1.tar.bz2 SMAPI-a1e1b7d10393dc23fa306ef03e392aa03e0b9ee1.zip |
fix map tile rotation broken when you return to title
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 99a809ad..06d9eac1 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -142,6 +142,9 @@ namespace StardewModdingAPI.Framework /// <summary>Whether the game is creating the save file and SMAPI has already raised <see cref="IGameLoopEvents.SaveCreating"/>.</summary> private bool IsBetweenCreateEvents; + /// <summary>Whether the player just returned to the title screen.</summary> + private bool JustReturnedToTitle; + /// <summary>Asset interceptors added or removed since the last tick.</summary> private readonly List<AssetInterceptorChange> ReloadAssetInterceptorsQueue = new List<AssetInterceptorChange>(); @@ -456,9 +459,17 @@ namespace StardewModdingAPI.Framework try { + /********* + ** Safe queued work + *********/ + // print warnings/alerts SCore.DeprecationManager.PrintQueued(); SCore.PerformanceMonitor.PrintQueuedAlerts(); + // reapply overrides + if (this.JustReturnedToTitle && !(Game1.mapDisplayDevice is SDisplayDevice)) + Game1.mapDisplayDevice = new SDisplayDevice(Game1.content, Game1.game1.GraphicsDevice); + /********* ** First-tick initialization *********/ @@ -1039,8 +1050,7 @@ namespace StardewModdingAPI.Framework { // perform cleanup this.Multiplayer.CleanupOnMultiplayerExit(); - if (!(Game1.mapDisplayDevice is SDisplayDevice)) - Game1.mapDisplayDevice = new SDisplayDevice(Game1.content, Game1.game1.GraphicsDevice); + this.JustReturnedToTitle = true; } /// <summary>Raised before the game exits.</summary> |