Centralize Windows App binding ownership
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user