From e56d13d8be0ac9774aecf477cb43c24987295dd0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 23 Mar 2022 14:21:35 +0900 Subject: [PATCH] Fix realm backed store not being initialised for some tests --- osu.Game/Skinning/Skin.cs | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/osu.Game/Skinning/Skin.cs b/osu.Game/Skinning/Skin.cs index 84041deb1a..4c2b58bbc2 100644 --- a/osu.Game/Skinning/Skin.cs +++ b/osu.Game/Skinning/Skin.cs @@ -63,26 +63,18 @@ namespace osu.Game.Skinning { if (resources != null) { - if (resources.RealmAccess != null) - { - SkinInfo = skin.ToLive(resources.RealmAccess); + SkinInfo = resources.RealmAccess != null + ? skin.ToLive(resources.RealmAccess) + : skin.ToLiveUnmanaged(); - storage ??= new RealmBackedResourceStore(skin, resources.Files, new[] { @"ogg" }); - } - else - { - SkinInfo = skin.ToLiveUnmanaged(); - } + storage ??= new RealmBackedResourceStore(skin, resources.Files, new[] { @"ogg" }); - if (storage != null) - { - var samples = resources.AudioManager?.GetSampleStore(storage); - if (samples != null) - samples.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY; + var samples = resources.AudioManager?.GetSampleStore(storage); + if (samples != null) + samples.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY; - Samples = samples; - Textures = new TextureStore(resources.CreateTextureLoaderStore(storage)); - } + Samples = samples; + Textures = new TextureStore(resources.CreateTextureLoaderStore(storage)); } configurationStream ??= storage?.GetStream(@"skin.ini");