mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Remove track fade
This commit is contained in:
parent
2a2b8912c1
commit
255b3b067b
@ -309,18 +309,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (e.Action == GlobalAction.Back && host.CanSuspendToBackground)
|
if (e.Action == GlobalAction.Back && host.CanSuspendToBackground)
|
||||||
{
|
{
|
||||||
bool didSuspend = host.SuspendToBackground();
|
if (host.SuspendToBackground())
|
||||||
|
|
||||||
if (didSuspend)
|
|
||||||
{
|
|
||||||
// fade the track so the Bass.Pause() on suspend isn't as jarring.
|
|
||||||
const double fade_time = 500;
|
|
||||||
musicController.CurrentTrack
|
|
||||||
.VolumeTo(0, fade_time, Easing.Out).Then()
|
|
||||||
.VolumeTo(1, fade_time, Easing.In);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user