fix asset key normalization for 64-bit hack (#767)

This commit is contained in:
Jesse Plamondon-Willard 2021-04-02 21:30:55 -04:00
parent 3fa0433c98
commit 60b563267e
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ namespace StardewModdingAPI.Framework.Content
IReflectedMethod method = reflection.GetMethod(typeof(TitleContainer), "GetCleanPath"); IReflectedMethod method = reflection.GetMethod(typeof(TitleContainer), "GetCleanPath");
this.NormalizeAssetNameForPlatform = path => method.Invoke<string>(path); this.NormalizeAssetNameForPlatform = path => method.Invoke<string>(path);
} }
else if (EarlyConstants.IsWindows64BitHack)
this.NormalizeAssetNameForPlatform = PathUtilities.NormalizePath;
else else
this.NormalizeAssetNameForPlatform = key => key.Replace('\\', '/'); // based on MonoGame's ContentManager.Load<T> logic this.NormalizeAssetNameForPlatform = key => key.Replace('\\', '/'); // based on MonoGame's ContentManager.Load<T> logic
} }