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
parent b016d53b85
commit 6487bf45cf
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

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;