From d2f6303988b24991d7b88d7cfe3613df185040da Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 2 Nov 2020 14:56:50 +0900 Subject: [PATCH] Change default value of requestedByUser to false --- osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs | 2 +- osu.Game/Overlays/MusicController.cs | 4 ++-- osu.Game/Screens/Play/Player.cs | 2 +- osu.Game/Tests/Visual/OsuTestScene.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs index c96952431a..5963f806c6 100644 --- a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs +++ b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs @@ -56,7 +56,7 @@ namespace osu.Game.Tests.Visual.Navigation AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault); if (withUserPause) - AddStep("pause", () => Game.Dependencies.Get().Stop()); + AddStep("pause", () => Game.Dependencies.Get().Stop(true)); AddStep("press enter", () => pressAndRelease(Key.Enter)); diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 7e7be31de6..eafbeebbc9 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -187,7 +187,7 @@ namespace osu.Game.Overlays /// Specifying true will ensure that other methods like /// will not resume music playback until the next explicit call to . /// - public void Stop(bool requestedByUser = true) + public void Stop(bool requestedByUser = false) { IsUserPaused |= requestedByUser; if (CurrentTrack.IsRunning) @@ -201,7 +201,7 @@ namespace osu.Game.Overlays public bool TogglePause() { if (CurrentTrack.IsRunning) - Stop(); + Stop(true); else Play(); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 4427bb02e2..3c0c643413 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -472,7 +472,7 @@ namespace osu.Game.Screens.Play { // at the point of restarting the track should either already be paused or the volume should be zero. // stopping here is to ensure music doesn't become audible after exiting back to PlayerLoader. - musicController.Stop(false); + musicController.Stop(); sampleRestart?.Play(); RestartRequested?.Invoke(); diff --git a/osu.Game/Tests/Visual/OsuTestScene.cs b/osu.Game/Tests/Visual/OsuTestScene.cs index 1c9bdd43ab..198d22fedd 100644 --- a/osu.Game/Tests/Visual/OsuTestScene.cs +++ b/osu.Game/Tests/Visual/OsuTestScene.cs @@ -189,7 +189,7 @@ namespace osu.Game.Tests.Visual rulesetDependencies?.Dispose(); if (MusicController?.TrackLoaded == true) - MusicController.Stop(false); + MusicController.Stop(); if (contextFactory?.IsValueCreated == true) contextFactory.Value.ResetDatabase();