From a8f9a727425803166c7fe25afd6eb1ebc35d3e60 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 31 Dec 2024 15:14:27 -0500 Subject: [PATCH] small bugfix: don't double-load pictures --- BenMakesGames.PlayPlayMini/BenMakesGames.PlayPlayMini.csproj | 2 +- BenMakesGames.PlayPlayMini/Services/GraphicsManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BenMakesGames.PlayPlayMini/BenMakesGames.PlayPlayMini.csproj b/BenMakesGames.PlayPlayMini/BenMakesGames.PlayPlayMini.csproj index 345efd6..a62bfe7 100644 --- a/BenMakesGames.PlayPlayMini/BenMakesGames.PlayPlayMini.csproj +++ b/BenMakesGames.PlayPlayMini/BenMakesGames.PlayPlayMini.csproj @@ -5,7 +5,7 @@ Ben Hendel-Doying An opinionated framework for making smallish games with MonoGame. 2021-2024 Ben Hendel-Doying - 5.2.0 + 5.2.1 true monogame game engine framework di state diff --git a/BenMakesGames.PlayPlayMini/Services/GraphicsManager.cs b/BenMakesGames.PlayPlayMini/Services/GraphicsManager.cs index 6cec8ad..c6d8406 100644 --- a/BenMakesGames.PlayPlayMini/Services/GraphicsManager.cs +++ b/BenMakesGames.PlayPlayMini/Services/GraphicsManager.cs @@ -89,7 +89,7 @@ public void LoadContent(GameStateManager gsm) PixelShaders = gsm.Assets.GetAll().ToDictionary(meta => meta.Key, _ => (Effect)null!); // load immediately - foreach(var meta in gsm.Assets.GetAll()) + foreach(var meta in gsm.Assets.GetAll().Where(m => m.PreLoaded)) LoadPicture(meta); foreach(var meta in gsm.Assets.GetAll().Where(m => m.PreLoaded))