Fix a couple of simple cases of incorrect TextureLoaderStore initialisation

This commit is contained in:
Dean Herbert
2020-12-21 13:35:46 +09:00
parent 9618f512d7
commit a8569fe15c
2 changed files with 5 additions and 3 deletions

View File

@ -13,6 +13,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics.OpenGL.Textures;
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Rulesets.Configuration;
namespace osu.Game.Rulesets.UI
@ -46,7 +47,7 @@ namespace osu.Game.Rulesets.UI
if (resources != null)
{
TextureStore = new TextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(resources, @"Textures")));
TextureStore = new TextureStore(parent.Get<GameHost>().CreateTextureLoaderStore(new NamespacedResourceStore<byte[]>(resources, @"Textures")));
CacheAs(TextureStore = new FallbackTextureStore(TextureStore, parent.Get<TextureStore>()));
SampleStore = parent.Get<AudioManager>().GetSampleStore(new NamespacedResourceStore<byte[]>(resources, @"Samples"));