Skip to content

Allow spectator and replay gameplay to load even when window is inactive#37633

Open
peppy wants to merge 1 commit intoppy:masterfrom
peppy:load-when-inactive-spectator-replay
Open

Allow spectator and replay gameplay to load even when window is inactive#37633
peppy wants to merge 1 commit intoppy:masterfrom
peppy:load-when-inactive-spectator-replay

Conversation

@peppy
Copy link
Copy Markdown
Member

@peppy peppy commented May 4, 2026

This used to be the case, but recently changed with the introduction of pausing when inactive. The change was intended to work for local gameplay modes, but it makes less sense for spectator/replay where you may want to be watching in the background while doing something else.

Raised via email.

This used to be the case, but recently changed with the introduction of
[pausing when inactive](ppy#37100). The
change was intended to work for local gameplay modes, but it makes less
sense for spectator/replay where you may want to be watching in the
background while doing something else.

Raised via email.
@bdach bdach self-requested a review May 7, 2026 06:39
Copy link
Copy Markdown
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work for replay-generating mods like Autoplay or Cinema. It's unclear to me whether that is intentional or not.

This is because in song select, it can be that a normal PlayerLoader (as opposed to a ReplayPlayerLoader) pushes a ReplayPlayer.

this.Push(playerLoader = new PlayerLoader(createPlayer));
Player createPlayer()
{
Player player;
var replayGeneratingMod = Mods.Value.OfType<ICreateReplayData>().FirstOrDefault();
if (replayGeneratingMod != null)
{
player = new ReplayPlayer(replayGeneratingMod.CreateScoreFromReplayData);
}
else
{
player = new SoloPlayer();
}
return player;
}

If this is unintentional / broken, then I can think of the following fixes:

  • Changing above code such that ReplayPlayerLoader is pushed to begin with if a replay-generating mod is present
  • Exposing WindowShouldBeActiveForGameplay as public rather than protected and setting it in the broken usage site as required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants