mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:13:03 +08:00
Rewrite to read better
Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
parent
6f29cbccd1
commit
33a87976a8
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -306,10 +307,13 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (e.Repeat)
|
if (e.Repeat)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (e.Action == GlobalAction.Back && host.CanSuspendToBackground)
|
switch (e.Action)
|
||||||
{
|
{
|
||||||
if (host.SuspendToBackground())
|
case GlobalAction.Back:
|
||||||
return true;
|
// In the case of a host being able to exit, the back action is handled by ExitConfirmOverlay.
|
||||||
|
Debug.Assert(!host.CanExit);
|
||||||
|
|
||||||
|
return host.SuspendToBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user