mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix audio preview buttons not correctly handling load failure states
Closes #4593.
This commit is contained in:
@ -129,7 +129,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
if (Preview != null)
|
||||
{
|
||||
Preview.Start();
|
||||
attemptStart();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
// user may have changed their mind.
|
||||
if (Playing.Value)
|
||||
preview.Start();
|
||||
attemptStart();
|
||||
});
|
||||
}
|
||||
else
|
||||
@ -157,6 +157,12 @@ namespace osu.Game.Overlays.Direct
|
||||
}
|
||||
}
|
||||
|
||||
private void attemptStart()
|
||||
{
|
||||
if (Preview?.Start() != true)
|
||||
Playing.Value = false;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
Reference in New Issue
Block a user