mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Fix OsuLegacySkin fallback logic being incorrect (#5948)
Fix OsuLegacySkin fallback logic being incorrect Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
commit
6009cd2537
@ -115,7 +115,13 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
public SampleChannel GetSample(ISampleInfo sample) => source.GetSample(sample);
|
||||
|
||||
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration
|
||||
=> configuration.Value is TConfiguration conf ? query.Invoke(conf) : source.GetValue(query);
|
||||
{
|
||||
TValue val;
|
||||
if (configuration.Value is TConfiguration conf && (val = query.Invoke(conf)) != null)
|
||||
return val;
|
||||
|
||||
return source.GetValue(query);
|
||||
}
|
||||
|
||||
private bool hasFont(string fontName) => source.GetTexture($"{fontName}-0") != null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user