From 6136e4e27aeb09a69bce778b85362813867d7f05 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 15 Jun 2022 17:37:14 +0900 Subject: [PATCH] Don't play exit sound if screen is in a non-resumable state when exiting --- osu.Game/Screens/Edit/EditorLoader.cs | 2 -- osu.Game/Screens/OsuScreen.cs | 2 +- osu.Game/Screens/Play/PlayerLoader.cs | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/osu.Game/Screens/Edit/EditorLoader.cs b/osu.Game/Screens/Edit/EditorLoader.cs index 94eb6d5e70..0a2b8437fa 100644 --- a/osu.Game/Screens/Edit/EditorLoader.cs +++ b/osu.Game/Screens/Edit/EditorLoader.cs @@ -40,8 +40,6 @@ namespace osu.Game.Screens.Edit public override bool DisallowExternalBeatmapRulesetChanges => true; - protected override bool PlayExitSound => false; - [Resolved] private BeatmapManager beatmapManager { get; set; } diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index e742a2821f..810aadffad 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -212,7 +212,7 @@ namespace osu.Game.Screens public override bool OnExiting(ScreenExitEvent e) { - if (PlayExitSound) + if (ValidForResume && PlayExitSound) sampleExit?.Play(); if (ValidForResume && logo != null) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index b7b3c6fde1..f3b22c3355 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -51,8 +51,6 @@ namespace osu.Game.Screens.Play // We show the previous screen status protected override UserActivity? InitialActivity => null; - protected override bool PlayExitSound => false; - protected BeatmapMetadataDisplay MetadataInfo { get; private set; } = null!; ///