From f99b630993166725e91ccf2868cc4cefe2008286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 22 Nov 2015 16:55:07 +0100 Subject: Load main scene if defined when running editor from the command line If no main scene is defined, or if it's an empty string, the previous behaviour will still be used, i.e. launch the project manager. A small fix was also added not to maximize the window when opening the project manager via -editor (i.e. "godot" and "godot -e" will behave the same when no project is in the path). Fixes #2869. --- main/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/main.cpp b/main/main.cpp index b6bc10cee7..3ea9128e13 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -432,7 +432,6 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas } else if (I->get()=="-e" || I->get()=="-editor") { // fonud editor editor=true; - init_maximized=true; } else if (I->get()=="-nowindow") { // fullscreen OS::get_singleton()->set_no_window_mode(true); @@ -649,6 +648,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas if (editor) { main_args.push_back("-editor"); + init_maximized=true; use_custom_res=false; } @@ -1093,7 +1093,7 @@ bool Main::start() { #endif - if(script=="" && game_path=="" && !editor && String(GLOBAL_DEF("application/main_scene",""))!="") { + if(script=="" && game_path=="" && String(GLOBAL_DEF("application/main_scene",""))!="") { game_path=GLOBAL_DEF("application/main_scene",""); } -- cgit v1.2.3 From 00ddb532fbfc10b016aa193e2443830341e3fec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 23 Nov 2015 00:38:12 +0100 Subject: Silence too verbose boot splash debug info --- main/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'main') diff --git a/main/main.cpp b/main/main.cpp index b6bc10cee7..e52b87913b 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -870,19 +870,18 @@ Error Main::setup2() { String boot_logo_path=GLOBAL_DEF("application/boot_splash",String()); bool boot_logo_scale=GLOBAL_DEF("application/boot_splash_fullsize",true); Globals::get_singleton()->set_custom_property_info("application/boot_splash",PropertyInfo(Variant::STRING,"application/boot_splash",PROPERTY_HINT_FILE,"*.png")); - print_line("BOOT SPLASH: "+boot_logo_path); Image boot_logo; boot_logo_path = boot_logo_path.strip_edges(); - print_line("BOOT SPLASH IS : "+boot_logo_path); if (boot_logo_path!=String() /*&& FileAccess::exists(boot_logo_path)*/) { + print_line("Boot splash path: "+boot_logo_path); Error err = boot_logo.load(boot_logo_path); if (err!=OK) { - print_line("ËRROR LOADING BOOT LOGO SPLASH :"+boot_logo_path); + print_line("Error loading boot logo splash!); } else { - print_line("BOOT SPLASH OK!"); + print_line("Boot splash OK!"); } } @@ -901,7 +900,7 @@ Error Main::setup2() { } else { #ifndef NO_DEFAULT_BOOT_LOGO - MAIN_PRINT("Main: Create botsplash"); + MAIN_PRINT("Main: Create bootsplash"); Image splash(boot_splash_png); MAIN_PRINT("Main: ClearColor"); -- cgit v1.2.3 From b01546f91c498bb230c267a2f21654d7b3565d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 24 Nov 2015 10:14:06 +0100 Subject: Fix typo, missing quote --- main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') diff --git a/main/main.cpp b/main/main.cpp index 9f551d62be..9a9a2d4e4f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -879,7 +879,7 @@ Error Main::setup2() { print_line("Boot splash path: "+boot_logo_path); Error err = boot_logo.load(boot_logo_path); if (err!=OK) { - print_line("Error loading boot logo splash!); + print_line("Error loading boot logo splash!"); } else { print_line("Boot splash OK!"); -- cgit v1.2.3