From d100681be7ef1eafd8ec5e98984c41d7473ad3d0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 8 Jan 2021 20:48:15 -0500 Subject: update for draw changes in SDV 1.5.2 --- src/SMAPI/Framework/SGame.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/SMAPI') diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index f69c5f08..2ede40ae 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -247,7 +247,7 @@ namespace StardewModdingAPI.Framework } if (target_screen != null) { - base.GraphicsDevice.SetRenderTarget(target_screen); + Game1.SetRenderTarget(target_screen); } if (this.IsSaving) { @@ -352,8 +352,7 @@ namespace StardewModdingAPI.Framework events.Rendered.RaiseEmpty(); Game1.spriteBatch.End(); } - - base.GraphicsDevice.SetRenderTarget(target_screen); + Game1.SetRenderTarget(target_screen); return; } if (Game1.showingEndOfNightStuff) @@ -426,7 +425,7 @@ namespace StardewModdingAPI.Framework } if (Game1.drawLighting) { - base.GraphicsDevice.SetRenderTarget(Game1.lightmap); + Game1.SetRenderTarget(Game1.lightmap); base.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.White * 0f); Matrix lighting_matrix = Matrix.Identity; if (this.useUnscaledLighting) @@ -473,7 +472,7 @@ namespace StardewModdingAPI.Framework } } Game1.spriteBatch.End(); - base.GraphicsDevice.SetRenderTarget(target_screen); + Game1.SetRenderTarget(target_screen); } if (Game1.bloomDay && Game1.bloom != null) { -- cgit