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:
parent
c9db0bf886
commit
40ddccf0c7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user