Thin Win32 lifecycle close handling

This commit is contained in:
2026-06-17 14:43:44 +02:00
parent 2f33b00b2a
commit 74abddd81e
5 changed files with 14 additions and 2 deletions

View File

@@ -16,8 +16,7 @@ void request_window_close(HWND hWnd)
void handle_window_close_message(VrShellState& vr)
{
shutdown_bound_lifecycle(vr);
PostQuitMessage(0);
shutdown_bound_lifecycle_and_quit(vr);
}
void update_stylus_frame(float dt)

View File

@@ -46,6 +46,12 @@ void shutdown_bound_lifecycle(VrShellState& vr)
shutdown_bound_app_runtime();
}
void shutdown_bound_lifecycle_and_quit(VrShellState& vr)
{
shutdown_bound_lifecycle(vr);
PostQuitMessage(0);
}
bool start_bound_lifecycle_vr(VrShellState& vr, bool sandboxed)
{
return start_vr_shell(vr, sandboxed, retained_lifecycle_running_state());

View File

@@ -13,6 +13,7 @@ void mark_lifecycle_stopped() noexcept;
[[nodiscard]] bool lifecycle_is_running() noexcept;
[[nodiscard]] std::atomic<int>& retained_lifecycle_running_state() noexcept;
void shutdown_bound_lifecycle(VrShellState& vr);
void shutdown_bound_lifecycle_and_quit(VrShellState& vr);
[[nodiscard]] bool start_bound_lifecycle_vr(VrShellState& vr, bool sandboxed);
void stop_bound_lifecycle_vr(VrShellState& vr);