Skip to content

Commit

Permalink
small bugfix: don't double-load pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMakesGames committed Dec 31, 2024
1 parent f725900 commit a8f9a72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Company>Ben Hendel-Doying</Company>
<Description>An opinionated framework for making smallish games with MonoGame.</Description>
<Copyright>2021-2024 Ben Hendel-Doying</Copyright>
<Version>5.2.0</Version>
<Version>5.2.1</Version>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>monogame game engine framework di state</PackageTags>
Expand Down
2 changes: 1 addition & 1 deletion BenMakesGames.PlayPlayMini/Services/GraphicsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void LoadContent(GameStateManager gsm)
PixelShaders = gsm.Assets.GetAll<PixelShaderMeta>().ToDictionary(meta => meta.Key, _ => (Effect)null!);

// load immediately
foreach(var meta in gsm.Assets.GetAll<PictureMeta>())
foreach(var meta in gsm.Assets.GetAll<PictureMeta>().Where(m => m.PreLoaded))
LoadPicture(meta);

foreach(var meta in gsm.Assets.GetAll<SpriteSheetMeta>().Where(m => m.PreLoaded))
Expand Down

0 comments on commit a8f9a72

Please sign in to comment.