From 30a07888da3756e737861ab23f424e31c10c2eb4 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Wed, 17 Jun 2026 11:55:13 +0200 Subject: [PATCH] Narrow Win32 runtime shell surface --- docs/modernization/roadmap.md | 9 +++++++++ docs/modernization/tasks.md | 8 ++++++++ src/main.cpp | 1 + src/platform_windows/windows_runtime_session.cpp | 2 ++ src/platform_windows/windows_runtime_shell.cpp | 10 +--------- src/platform_windows/windows_runtime_shell.h | 4 ---- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index 48b60850..ab73f707 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -75,6 +75,15 @@ Latest slice: `windows_runtime_flow.cpp`. - `src/platform_windows/windows_runtime_flow.cpp` is now a thinner handoff layer over that Windows session helper. +- `src/platform_windows/windows_runtime_shell.h` no longer exposes the removed + runtime-session entrypoint or drags bootstrap/splash declarations through the + broader shell header surface. +- `src/platform_windows/windows_runtime_shell.cpp` now hands runtime execution + directly to `run_bound_main_window_runtime(...)` instead of keeping a second + wrapper around that seam. +- `src/main.cpp` now includes `windows_bootstrap_helpers.h` directly for + `run_winmain_entry(...)` instead of relying on a transitive declaration + through the Windows runtime shell header. - `src/platform_windows/windows_runtime_flow.*` now owns the Win32 bound-app startup/message-loop/shutdown orchestration that used to live in `windows_runtime_shell.cpp`. diff --git a/docs/modernization/tasks.md b/docs/modernization/tasks.md index c2f42360..9b40e61c 100644 --- a/docs/modernization/tasks.md +++ b/docs/modernization/tasks.md @@ -82,6 +82,14 @@ Current slice: Win32 runtime loop/startup/shutdown body. - `src/platform_windows/windows_runtime_flow.cpp` is now only a thin handoff into that session helper. +- `src/platform_windows/windows_runtime_shell.h` no longer exposes the removed + runtime-session entrypoint or carries bootstrap/splash declarations for it. +- `src/platform_windows/windows_runtime_shell.cpp` now calls + `run_bound_main_window_runtime(...)` directly instead of keeping a second + wrapper entrypoint around that seam. +- `src/main.cpp` now includes `windows_bootstrap_helpers.h` directly for + `run_winmain_entry(...)` instead of depending on a transitive declaration + through the shell header. - `src/platform_windows/windows_runtime_flow.*` now owns the Win32 bound-app startup/message-loop/shutdown orchestration. - `src/platform_windows/windows_runtime_shell.cpp` now delegates that runtime diff --git a/src/main.cpp b/src/main.cpp index 400d8ce5..e9410f4e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include "platform_windows/windows_bootstrap_helpers.h" #include "platform_windows/windows_runtime_shell.h" int main(int argc, char** argv) diff --git a/src/platform_windows/windows_runtime_session.cpp b/src/platform_windows/windows_runtime_session.cpp index e21f6661..aa20c712 100644 --- a/src/platform_windows/windows_runtime_session.cpp +++ b/src/platform_windows/windows_runtime_session.cpp @@ -4,8 +4,10 @@ #include "app.h" #include "log.h" +#include "platform_windows/windows_bootstrap_helpers.h" #include "platform_windows/windows_lifecycle_state.h" #include "platform_windows/windows_main_window_session.h" +#include "platform_windows/windows_platform_services.h" #include "platform_windows/windows_runtime_shell.h" #include "platform_windows/windows_runtime_state.h" #include "wacom.h" diff --git a/src/platform_windows/windows_runtime_shell.cpp b/src/platform_windows/windows_runtime_shell.cpp index 46ed6af5..67b91e99 100644 --- a/src/platform_windows/windows_runtime_shell.cpp +++ b/src/platform_windows/windows_runtime_shell.cpp @@ -3,9 +3,7 @@ #include "platform_windows/windows_runtime_shell.h" #include "app.h" -#include "log.h" #include "platform_windows/windows_bootstrap_helpers.h" -#include "platform_windows/windows_lifecycle_state.h" #include "platform_windows/windows_main_window_session.h" #include "platform_windows/windows_platform_services.h" #include "platform_windows/windows_runtime_flow.h" @@ -13,7 +11,6 @@ #include "platform_windows/windows_stylus_input.h" #include "platform_windows/windows_window_shell.h" #include "wacom.h" -#include "../resource.h" namespace pp::platform::windows { @@ -108,14 +105,9 @@ int run_main_application(int argc, char** argv) } } - pp::platform::windows::run_main_window_runtime(startup, start_in_vr, instance, splash); + pp::platform::windows::run_bound_main_window_runtime(startup, start_in_vr, instance, splash); release_bound_app(); return 0; } -void run_main_window_runtime(const MainWindowStartupState& startup, bool start_in_vr, HINSTANCE instance, SplashScreen& splash) -{ - run_bound_main_window_runtime(startup, start_in_vr, instance, splash); -} - } diff --git a/src/platform_windows/windows_runtime_shell.h b/src/platform_windows/windows_runtime_shell.h index 551d4062..2c63e0f4 100644 --- a/src/platform_windows/windows_runtime_shell.h +++ b/src/platform_windows/windows_runtime_shell.h @@ -1,15 +1,11 @@ #pragma once -#include "platform_windows/windows_bootstrap_helpers.h" -#include "platform_windows/windows_splash.h" - class App; class WacomTablet; namespace pp::platform::windows { int run_main_application(int argc, char** argv); -void run_main_window_runtime(const MainWindowStartupState& startup, bool start_in_vr, HINSTANCE instance, SplashScreen& splash); void bind_app(App* app) noexcept; [[nodiscard]] App* bound_app() noexcept; void release_bound_app() noexcept;