Thin Win32 lifecycle close handling
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user