1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 07:09:53 +08:00

Eagerly attempt to pause the game when the window is not focused

This commit is contained in:
Dean Herbert
2017-05-16 17:55:35 +09:00
Unverified
parent b016d53b85
commit 6487bf45cf
+9
View File
@@ -224,6 +224,15 @@ namespace osu.Game.Screens.Play
};
}
protected override void Update()
{
// eagerly pause when we lose window focus (if we are locally playing).
if (!Game.IsActive && !HitRenderer.HasReplayLoaded)
Pause();
base.Update();
}
private void initializeSkipButton()
{
const double skip_required_cutoff = 3000;