Completely change the way we fix the bug

This commit is contained in:
Desconocidosmh
2019-07-09 11:32:49 +02:00
parent 8f7476e9cc
commit 2546f647be
5 changed files with 18 additions and 28 deletions

View File

@ -87,6 +87,9 @@ namespace osu.Game.Screens.Select
private readonly Bindable<RulesetInfo> decoupledRuleset = new Bindable<RulesetInfo>();
[Resolved]
private MusicController musicController { get; set; }
[Cached]
[Cached(Type = typeof(IBindable<IReadOnlyList<Mod>>))]
private readonly Bindable<IReadOnlyList<Mod>> mods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>()); // Bound to the game's mods, but is not reset on exiting
@ -426,8 +429,6 @@ namespace osu.Game.Screens.Select
{
base.OnEntering(last);
ResumeIfNoUserPauseRequested();
this.FadeInFromZero(250);
FilterControl.Activate();
}
@ -572,7 +573,7 @@ namespace osu.Game.Screens.Select
{
Track track = Beatmap.Value.Track;
if (!track.IsRunning || restart)
if ((!track.IsRunning || restart) && !musicController.UserRequestedPause)
{
track.RestartPoint = Beatmap.Value.Metadata.PreviewTime;
track.Restart();