Skip to content

[GEN][ZH] Do not pause Replay playback on CRC mismatch if a Game Window has input focus #1294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2025

Conversation

xezon
Copy link

@xezon xezon commented Jul 16, 2025

This change is an alternative fix to #1209. It prevents the pausing on Replay playback CRC mismatch if there is an active Game Window that has focus and eventually blocks input.

@xezon xezon added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker ThisProject The issue was introduced by this project, or this task is specific to this project labels Jul 16, 2025
@xezon xezon requested a review from Caball009 July 16, 2025 20:09
@Mauller
Copy link

Mauller commented Jul 16, 2025

Does this mean the game won't pause on mismatch when we are playing back a replay while watching it?

Bool pauseInput = FALSE;
TheGameLogic->setGamePaused(pause, pauseMusic, pauseInput);
// But not when a window with focus is opened, because that can make resuming difficult.
if (TheWindowManager->winGetFocus() == NULL)
Copy link

@Caball009 Caball009 Jul 16, 2025

Choose a reason for hiding this comment

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

This would mean that the replay never pauses (if there's a window in focus), even though people probably rely on that with a mismatch.

Maybe put the m_crcInfo->setSawCRCMismatch(); at least in this branch? That way the game will pause as soon as the window closes (may be done with scripts).

Copy link
Author

Choose a reason for hiding this comment

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

Ok. Tested and worked. Will spam mismatch message every 100 frames until pausing.

Choose a reason for hiding this comment

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

That's fine I think as long as it's very unlikely to happen, which seems to be case.

@xezon
Copy link
Author

xezon commented Jul 16, 2025

Does this mean the game won't pause on mismatch when we are playing back a replay while watching it?

Only if there is a Window that has focus. There typically is none. I tested with the Diplomacy Screen opened and even then the Replay paused.

@xezon xezon requested a review from Caball009 July 16, 2025 20:39
Copy link

@Caball009 Caball009 left a comment

Choose a reason for hiding this comment

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

Looks ok.

Thank you for taking the time for this replacement PR.

@xezon xezon changed the title [GEN][ZH] Do not pause Replay playback on CRC mismatch if a Game Window has focus to avoid input problems [GEN][ZH] Do not pause Replay playback on CRC mismatch if a Game Window has input focus Jul 16, 2025
@xezon xezon merged commit 16c50f7 into TheSuperHackers:main Jul 16, 2025
15 checks passed
@xezon xezon deleted the xezon/fix-crc-mismatch-pause branch July 16, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker ThisProject The issue was introduced by this project, or this task is specific to this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants