mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Handle case where SkinManager
sources aren't part of AllSources
In tests.
This commit is contained in:
parent
53fa229880
commit
d484469906
@ -87,7 +87,11 @@ namespace osu.Game.Skinning
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SkinSources.Insert(SkinSources.IndexOf(skinManager.DefaultSkin), new RulesetResourcesSkin(Ruleset, host, audio));
|
var defaultSkinIndex = SkinSources.IndexOf(skinManager.DefaultSkin);
|
||||||
|
if (defaultSkinIndex >= 0)
|
||||||
|
SkinSources.Insert(defaultSkinIndex, new RulesetResourcesSkin(Ruleset, host, audio));
|
||||||
|
else
|
||||||
|
SkinSources.Add(new RulesetResourcesSkin(Ruleset, host, audio));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ISkin GetLegacyRulesetTransformedSkin(ISkin legacySkin)
|
protected ISkin GetLegacyRulesetTransformedSkin(ISkin legacySkin)
|
||||||
|
Loading…
Reference in New Issue
Block a user