fix(app): keep the app alive on Emscripten after bj_run_app returns #182
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
OragonEfreet/banjo!182
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/emscripten-app-lifetime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Emscripten, bj_run_app registers em_step with the browser loop and returns straight away.
Since
c4f554ait then released the time subsystem and freed the app as the native path does, leaving em_step with a dangling pointer.The first frame still drew, but step no longer ran, so bj_dispatch_events was never called and every game ignored input.
em_step now owns the app once the loop is registered and releases it on quit, after teardown.