Skip to content

Add replay-safe host UI actions and graceful exit - #217

Merged
mstan merged 1 commit into
mainfrom
fix/pause-panel-exit-20261025
Oct 26, 2026
Merged

mstan merged 1 commit into
mainfrom
fix/pause-panel-exit-20261025

Conversation

@mstan

@mstan mstan commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

The current published engine lacks the exit endpoint used by the latest Super Metroid pause Options panel. Add snesrecomp_request_exit() through SDL's existing quit event so callers return normally and configuration, SRAM and host resources use ordinary shutdown.

Add snesrecomp_host_frame_is_live() for game-owned UI callbacks. Speculative run-ahead and netplay rollback replay cannot request application exit or commit UI settings. The replay flag spans the host's complete replay callback, including title hooks.

Validation:

  • Actual desktop implementation tested against real SDL2 and SDL3 event queues on Linux: normal request queues quit, speculative/replay requests queue nothing; assertions enabled (2 parameter cases).
  • Windows netplay-enabled Mega Man X desktop-host translation unit compiles with the new API and replay bracket.
  • Super Metroid panel unit passes its existing golden pixels and new non-live-settings/cursor-restore checks.
  • Full supported strict-idempotent Super Metroid regeneration passes against the integration of this branch and audio PR216; built panel shutdown/config/SRAM and regression qualification are in progress.

Do not merge before the combined built-runtime/owner handoff. This branch contains no generator changes or save-state migration.

Built integration validation: frozen Super Metroid Options branch 227e6af with combined engine cb85 (audio216 + exit217) passes all16 CTests and a real freshbooted ROM test. Actual Options input changes HUD/VSync, restores the tab after fileload, preserves navigation under run-ahead, then exits0 through SDL_QUIT. VSync1/RunAhead1 and an8-byte isolated nativeSRAM sentinel persist. Permanent regression: tools/test_pause_options_live.py; exact EXE SHA in options-final227/sm-pause-options-yruwjunh/report.json. Main merge remains owner-gated.

Owner accepted the combined cb85d33 visual/gameplay handoff on 2026-10-26 and explicitly requested merge. Combined regression: MMX 23 executed CTests pass (2 optional Saber fixtures skipped), MMX and SMW normal movement plus same/fresh-process current-build save/load pass; Windows Super Metroid 16/16 tests and real Options Exit 0 with config/SRAM persistence pass. Existing matched runtime evidence remains valid. Steam Deck hardware is unavailable and has no hardware-audio pass.

@mstan
mstan marked this pull request as ready for review October 26, 2026 16:41
@mstan
mstan merged commit 246c0d4 into main Oct 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants