Skip to content

Commit

Permalink
Content loading is now case insensitive, fixing issue with Gum conten…
Browse files Browse the repository at this point in the history
…t loading.
  • Loading branch information
vchelaru committed Jan 20, 2024
1 parent 182546d commit 497a4d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Engines/FlatRedBallXNA/FlatRedBall/Content/ContentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ public partial class ContentManager : Microsoft.Xna.Framework.Content.ContentMan
TextureContentLoader textureContentLoader = new TextureContentLoader();

//internal Dictionary<string, Type> mAssetTypeAssociation;
internal Dictionary<string, object> mAssets;
internal Dictionary<string, IDisposable> mDisposableDictionary = new Dictionary<string, IDisposable>();
Dictionary<string, object> mNonDisposableDictionary = new Dictionary<string, object>();
internal Dictionary<string, object> mAssets = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);

internal Dictionary<string, IDisposable> mDisposableDictionary = new Dictionary<string, IDisposable>(StringComparer.OrdinalIgnoreCase);
Dictionary<string, object> mNonDisposableDictionary = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);

Dictionary<string, Action> mUnloadMethods = new Dictionary<string, Action>();

Expand Down Expand Up @@ -199,7 +200,6 @@ public ContentManager(string name, IServiceProvider serviceProvider)
{
mName = name;
// mAssetTypeAssociation = new Dictionary<string, Type>();
mAssets = new Dictionary<string, object>();
ManualResetEventList = new List<ManualResetEvent>();
}

Expand All @@ -208,7 +208,6 @@ public ContentManager(string name, IServiceProvider serviceProvider, string root
{
mName = name;
// mAssetTypeAssociation = new Dictionary<string, Type>();
mAssets = new Dictionary<string, object>();
ManualResetEventList = new List<ManualResetEvent>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public T LoadContent<T>(string contentName)
#if ANDROID || IOS
contentName = contentName.ToLowerInvariant();
#endif
// alwasy prefer global content first:

return FlatRedBall.FlatRedBallServices.Load<T>(contentName, ContentManagerName);
}
}
Expand Down

0 comments on commit 497a4d0

Please sign in to comment.