mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09: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:
@ -160,7 +160,6 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!Mods.Value.Any(m => m is ModAutoplay))
|
if (!Mods.Value.Any(m => m is ModAutoplay))
|
||||||
PrepareReplay();
|
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.BindTo(gameBase.IsActive);
|
||||||
gameActive.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
gameActive.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
||||||
}
|
}
|
||||||
@ -267,8 +266,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateGameplayState());
|
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateGameplayState());
|
||||||
|
|
||||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
|
||||||
|
|
||||||
// bind clock into components that require it
|
// bind clock into components that require it
|
||||||
DrawableRuleset.IsPaused.BindTo(GameplayClockContainer.IsPaused);
|
DrawableRuleset.IsPaused.BindTo(GameplayClockContainer.IsPaused);
|
||||||
|
|
||||||
@ -431,7 +428,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void updatePauseOnFocusLostState()
|
private void updatePauseOnFocusLostState()
|
||||||
{
|
{
|
||||||
if (!PauseOnFocusLost || DrawableRuleset.HasReplayLoaded.Value || breakTracker.IsBreakTime.Value)
|
if (!PauseOnFocusLost || breakTracker.IsBreakTime.Value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gameActive.Value == false)
|
if (gameActive.Value == false)
|
||||||
|
Reference in New Issue
Block a user