Centralize Windows App binding ownership

This commit is contained in:
2026-06-17 09:18:59 +02:00
parent d502bf9331
commit 01ff014dd9
2 changed files with 1 additions and 2 deletions

View File

@@ -124,6 +124,7 @@ void shutdown_main_window_runtime(const MainWindowStartupState& startup, HINSTAN
void bind_app(App* app) noexcept
{
retained_runtime_state().app = app;
App::I = app;
}
App* bound_app() noexcept
@@ -157,7 +158,6 @@ int run_main_application(int argc, char** argv)
state.hInst = GetModuleHandle(NULL);
auto* app = new App();
App::I = app;
bind_app(app);
bind_runtime(&app->runtime());
bind_wacom_tablet(&WacomTablet::I);