Thin Win32 lifecycle close handling
This commit is contained in:
@@ -124,6 +124,9 @@ Latest slice:
|
||||
- `src/platform_windows/windows_lifecycle_state.*` now also owns the Win32
|
||||
lifecycle close/VR control handoff, so `windows_lifecycle_shell.cpp` is
|
||||
down to a thinner message adapter over the retained lifecycle state helper.
|
||||
- `src/platform_windows/windows_lifecycle_state.*` now also owns the Win32
|
||||
close-message shutdown/quit handoff, so `windows_lifecycle_shell.cpp` is
|
||||
down to a one-line adapter over the retained lifecycle state helper.
|
||||
- `src/platform_windows/windows_runtime_shell.h` is now a thinner runtime
|
||||
entrypoint header that picks up the retained binding surface from
|
||||
`windows_runtime_state.h` instead of declaring a second shell-owned binding
|
||||
|
||||
@@ -133,6 +133,9 @@ Current slice:
|
||||
- `src/platform_windows/windows_lifecycle_state.*` now also owns the Win32
|
||||
lifecycle close/VR control handoff, so `windows_lifecycle_shell.cpp` is
|
||||
down to a thinner message adapter over the retained lifecycle state helper.
|
||||
- `src/platform_windows/windows_lifecycle_state.*` now also owns the Win32
|
||||
close-message shutdown/quit handoff, so `windows_lifecycle_shell.cpp` is
|
||||
down to a one-line adapter over the retained lifecycle state helper.
|
||||
- `src/platform_windows/windows_runtime_shell.h` is thinner again and now
|
||||
imports that binding surface from `windows_runtime_state.h` instead of
|
||||
declaring shell-owned bind/release accessors itself.
|
||||
|
||||
@@ -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