1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 01:53:00 +08:00

Retrieve dll resources using a more reliable method

This commit is contained in:
Dean Herbert 2020-04-07 18:55:03 +09:00
parent 39fd297d7d
commit c9872f1d93

View File

@ -26,9 +26,6 @@ namespace osu.Game.Tests.Visual
private Skin specialSkin; private Skin specialSkin;
private Skin oldSkin; private Skin oldSkin;
// Keep a static reference to ensure we don't use a dynamically recompiled DLL as a source (resources will be missing).
private static DllResourceStore dllStore;
protected SkinnableTestScene() protected SkinnableTestScene()
: base(2, 3) : base(2, 3)
{ {
@ -37,7 +34,7 @@ namespace osu.Game.Tests.Visual
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(AudioManager audio, SkinManager skinManager) private void load(AudioManager audio, SkinManager skinManager)
{ {
dllStore ??= new DllResourceStore(GetType().Assembly); var dllStore = new DllResourceStore(DynamicCompilationOriginal.GetType().Assembly);
metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), audio, true); metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), audio, true);
defaultSkin = skinManager.GetSkin(DefaultLegacySkin.Info); defaultSkin = skinManager.GetSkin(DefaultLegacySkin.Info);