Skip to content

fix(command/ExitGame): ExitGame by sending quit message through SDL2#129

Open
EnderHane wants to merge 1 commit into
EverestAPI:masterfrom
EnderHane:exitgame-improve
Open

fix(command/ExitGame): ExitGame by sending quit message through SDL2#129
EnderHane wants to merge 1 commit into
EverestAPI:masterfrom
EnderHane:exitgame-improve

Conversation

@EnderHane

@EnderHane EnderHane commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

fix #128

@EnderHane EnderHane changed the title fix(command/ExitGame): ExitGame by sending close window message through SDL2 fix(command/ExitGame): ExitGame by sending quit message through SDL2 Dec 24, 2025
@EnderHane EnderHane marked this pull request as draft December 24, 2025 19:48
@EnderHane EnderHane marked this pull request as ready for review December 25, 2025 06:14
@EnderHane

Copy link
Copy Markdown
Contributor Author

This method let the game exit gracefully, FNA being able to handle resources cleaning and complete process lifecycle.

Alternatives:

  1. System.Environment.Exit() or System.Environment.FailFast()
    not good :<
  2. send SDL_WINDOWEVENT_CLOSE
    requires WindowID, thus being more too complicated

@psyGamer

Copy link
Copy Markdown
Member

What is the usecase for ExitGame today?
I honestly thought I had already removed the command entirely.

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.

[bug] ExitGame command causes crash

2 participants