Don't play exit sound if screen is in a non-resumable state when exiting

This commit is contained in:
Dean Herbert 2022-06-15 17:37:14 +09:00
parent b3aa4fcf02
commit 6136e4e27a
3 changed files with 1 additions and 5 deletions

View File

@ -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; }

View File

@ -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)

View File

@ -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!;
/// <summary>