From f5cf83e4b3fdf1e9ae82b00f39e45e189809c419 Mon Sep 17 00:00:00 2001 From: saturneric Date: Fri, 15 Dec 2023 17:04:59 +0800 Subject: fix: slove some issues on memory and intilizations --- src/init.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 56ed1d5d..780e9770 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -158,7 +158,7 @@ void InitGlobalPathEnv() { } } -void InitGlobalBasicalEnv(const GFCxtWPtr &p_ctx) { +void InitGlobalBasicalEnv(const GFCxtWPtr &p_ctx, bool gui_mode) { GFCxtSPtr ctx = p_ctx.lock(); if (ctx == nullptr) { return; @@ -170,11 +170,7 @@ void InitGlobalBasicalEnv(const GFCxtWPtr &p_ctx) { // change path to search for related InitGlobalPathEnv(); - if (ctx->load_ui_env) { - ctx->InitGUIApplication(); - } else { - ctx->InitCoreApplication(); - } + ctx->InitApplication(gui_mode); // should load module system first Module::ModuleInitArgs module_init_args; -- cgit v1.2.3