Skip to content

Fix: terminate application process on window close#7

Open
sapph1ren wants to merge 1 commit into
tekknolagi:trunkfrom
sapph1ren:fael
Open

Fix: terminate application process on window close#7
sapph1ren wants to merge 1 commit into
tekknolagi:trunkfrom
sapph1ren:fael

Conversation

@sapph1ren

Copy link
Copy Markdown

Currently, the application enters an infinite loop (for (;;)) that doesnt check for window close events. This causes the process to remain active in the background (visible in Task Manager) even after the user closes the window.
Changes in this PR:
Added r_loop() to renderer.c to wrap fenster_loop(), allowing the main loop to detect closure.
Added r_close() to properly shut down the fenster window and clean up resources.
Updated main.c to use while (r_loop() == 0) instead of an infinite loop, ensuring a clean exit when the window is closed.

@tekknolagi

Copy link
Copy Markdown
Owner

Oh, huh, did we not interact with fenster_loop at all before?

@sapph1ren

Copy link
Copy Markdown
Author

i guess not

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