1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-22 07:09:53 +08:00

Reuse AllSources when looking up on FindProvider

This commit is contained in:
Salman Ahmed
2021-06-22 10:49:21 +03:00
Unverified
parent b12adc6073
commit d0cdc07b11
+5 -8
View File
@@ -236,14 +236,11 @@ namespace osu.Game.Skinning
public ISkin FindProvider(Func<ISkin, bool> lookupFunction)
{
if (lookupFunction(CurrentSkin.Value))
return CurrentSkin.Value;
if (CurrentSkin.Value is LegacySkin && lookupFunction(DefaultLegacySkin))
return DefaultLegacySkin;
if (lookupFunction(DefaultSkin))
return DefaultSkin;
foreach (var source in AllSources)
{
if (lookupFunction(source))
return source;
}
return null;
}