1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Fix FallbackSampleStore.GetAsync fallback logic

This commit is contained in:
Susko3 2022-11-13 18:47:28 +01:00
parent f52540c0b8
commit 56fd1f95b1

View File

@ -115,7 +115,11 @@ namespace osu.Game.Rulesets.UI
public Sample Get(string name) => primary.Get(name) ?? fallback.Get(name);
public Task<Sample> GetAsync(string name, CancellationToken cancellationToken = default) => primary.GetAsync(name, cancellationToken) ?? fallback.GetAsync(name, cancellationToken);
public async Task<Sample> GetAsync(string name, CancellationToken cancellationToken = default)
{
return await primary.GetAsync(name, cancellationToken).ConfigureAwait(false)
?? await fallback.GetAsync(name, cancellationToken).ConfigureAwait(false);
}
public Stream GetStream(string name) => primary.GetStream(name) ?? fallback.GetStream(name);