diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 04020200b79..2a37654a23b 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -73,9 +73,10 @@ #endif #ifdef WITH_GAMEENGINE -#include "SYS_System.h" +#include "BL_System.h" #endif #include "GHOST_Path-api.h" +#include "GHOST_C-api.h" #include "RNA_define.h" @@ -105,7 +106,6 @@ #include "BKE_depsgraph.h" #include "BKE_sound.h" -#include "GHOST_C-api.h" static void wm_init_reports(bContext *C) { @@ -121,17 +121,11 @@ int wm_start_with_console = 0; /* only called once, for startup */ void WM_init(bContext *C, int argc, const char **argv) { - if (!G.background) { wm_ghost_init(C); /* note: it assigns C to ghost! */ wm_init_cursor_data(); -#ifdef WIN32 - if (IsConsoleEmpty()) /* never hide if the console window pre-existed */ - WM_console_toggle(C, wm_start_with_console); -#endif } GHOST_CreateSystemPaths(); - wm_operatortype_init(); set_free_windowmanager_cb(wm_close_and_free); /* library.c */ @@ -145,7 +139,6 @@ void WM_init(bContext *C, int argc, const char **argv) BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */ BLF_lang_init(); - /* get the default database, plus a wm */ WM_read_homefile(C, NULL, G.factory_startup); @@ -168,6 +161,9 @@ void WM_init(bContext *C, int argc, const char **argv) (void)argv; /* unused */ #endif + if (!G.background && !wm_start_with_console) + GHOST_toggleConsole(3); + wm_init_reports(C); /* reports cant be initialized before the wm */ if (!G.background) { @@ -195,7 +191,6 @@ void WM_init(bContext *C, int argc, const char **argv) */ BLI_strncpy(G.lib, G.main->name, FILE_MAX); - } void WM_init_splash(bContext *C) @@ -358,9 +353,6 @@ void WM_exit(bContext *C) sound_exit(); -#ifdef WIN32 - WM_console_toggle(C, 1); /* never leave behind invisible consoles */ -#endif /* first wrap up running stuff, we assume only the active WM is running */ /* modal handlers are on window level freed, others too? */ @@ -484,7 +476,6 @@ void WM_exit(bContext *C) getchar(); } #endif - exit(G.afbreek==1); } |