Skip to content

fix: handle RETRO_ENVIRONMENT_SHUTDOWN in Minarch#699

Merged
frysee merged 1 commit intoLoveRetro:mainfrom
josegonzalez:fix-prboom-exit
Mar 28, 2026
Merged

fix: handle RETRO_ENVIRONMENT_SHUTDOWN in Minarch#699
frysee merged 1 commit intoLoveRetro:mainfrom
josegonzalez:fix-prboom-exit

Conversation

@josegonzalez
Copy link
Copy Markdown
Collaborator

Summary

  • Minarch's environment callback had no handler for RETRO_ENVIRONMENT_SHUTDOWN (cmd 7), causing cores with built-in quit menus (e.g. PRBoom/Doom) to freeze the frontend instead of exiting cleanly
  • When a core requests shutdown, Minarch now sets quit = 1, using the same exit path as its own menu quit

Cores like PRBoom that have a built-in quit menu call
environ_cb(RETRO_ENVIRONMENT_SHUTDOWN) to request the frontend to exit.
Minarch had no handler for this command, so the request was silently
ignored, leaving the main loop spinning on a core that returns
immediately from retro_run() — resulting in a frozen screen with no
input response.

Set quit = 1 when shutdown is requested, matching the same exit path
used by Minarch's own quit menu.
@josegonzalez
Copy link
Copy Markdown
Collaborator Author

Yes I claude'd this.

@frysee frysee merged commit 7d201cf into LoveRetro:main Mar 28, 2026
62 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