diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index eafbeebbc9..d78f387b30 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -166,10 +166,17 @@ namespace osu.Game.Overlays /// /// Start playing the current track (if not already playing). /// + /// Whether to restart the track from the beginning. + /// + /// Whether the request to play was issued by the user rather than internally. + /// Specifying true will ensure that other methods like + /// will resume music playback going forward. + /// /// Whether the operation was successful. - public bool Play(bool restart = false) + public bool Play(bool restart = false, bool requestedByUser = false) { - IsUserPaused = false; + if (requestedByUser) + IsUserPaused = false; if (restart) CurrentTrack.Restart(); @@ -203,7 +210,7 @@ namespace osu.Game.Overlays if (CurrentTrack.IsRunning) Stop(true); else - Play(); + Play(requestedByUser: true); return true; } diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index a85e1869be..0473efd404 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -579,7 +579,8 @@ namespace osu.Game.Screens.Select updateComponentFromBeatmap(Beatmap.Value); // restart playback on returning to song select, regardless. - music.Play(); + // not sure this should be a permanent thing (we may want to leave a user pause paused even on returning) + music.Play(requestedByUser: true); } this.FadeIn(250);