Repository navigation
feat(port): add option to pause game when F8 menu is opened - #234
Open
jacobjordan94 wants to merge 1 commit into
Open
jacobjordan94 wants to merge 1 commit into
jacobjordan94 wants to merge 1 commit into
Conversation
…d in 999sian#225) Also fixes an existing audio desync: Practice Mode's frame-step pause lets music/SFX keep elapsing behind the frozen game, drifting out of sync with cutscenes once resumed. Fixed for both pause sources since they share the same freeze loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in setting, off by default, that freezes the game world while the F8 menu is open instead of letting it keep running behind the menu. It shows up as a checkbox in both the ribbon-mode footer and
classic mode's settings panel, right next to the existing Skip Launcher toggle.
It reuses Practice Mode's existing pause loop in
VBlankIntrWait()(present and pump events only, noPort_UpdateInput, so game state can't advance) instead of building a second freeze mechanism. The new setting just adds a second condition that can hold the same loop open.This also fixes an existing audio desync along the way. The SDL audio callback runs on its own thread and keeps consuming the stream no matter what the engine is doing, so music and SFX kept elapsing behind a frozen game and could drift out of sync with a cutscene once resumed.
That applied to Practice Mode's own frame-step pause too, since it shares the same loop, so both pause sources now pause and resume the audio device in lockstep with the freeze.
Requested in #225.
Testing
Linux, Bazzite host, built inside a Debian distrobox container.