1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00

Do not consider replays for "pause on focus lost"

Replays are not pausable as can be seen in the `canPause` check.
This commit is contained in:
Salman Ahmed 2021-02-06 20:55:55 +03:00
parent c9db0bf886
commit 40ddccf0c7

View File

@ -160,7 +160,6 @@ namespace osu.Game.Screens.Play
if (!Mods.Value.Any(m => m is ModAutoplay))
PrepareReplay();
// needs to be bound here as the last binding, otherwise cases like starting a replay while not focused causes player to exit, if activity is bound before checks.
gameActive.BindTo(gameBase.IsActive);
gameActive.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
}
@ -267,8 +266,6 @@ namespace osu.Game.Screens.Play
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateGameplayState());
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
// bind clock into components that require it
DrawableRuleset.IsPaused.BindTo(GameplayClockContainer.IsPaused);
@ -431,7 +428,7 @@ namespace osu.Game.Screens.Play
private void updatePauseOnFocusLostState()
{
if (!PauseOnFocusLost || DrawableRuleset.HasReplayLoaded.Value || breakTracker.IsBreakTime.Value)
if (!PauseOnFocusLost || breakTracker.IsBreakTime.Value)
return;
if (gameActive.Value == false)