mirror of
https://github.com/godotengine/godot.git
synced 2024-12-29 06:13:24 +00:00
Merge pull request #11299 from marcelofg55/fix_seticon_default
Fix setting the default icon briefly with tools=no
This commit is contained in:
commit
ffec7cf193
@ -990,8 +990,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
Ref<Image> icon = memnew(Image(app_icon_png));
|
Ref<Image> icon = memnew(Image(app_icon_png));
|
||||||
OS::get_singleton()->set_icon(icon);
|
OS::get_singleton()->set_icon(icon);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MAIN_PRINT("Main: DCC");
|
MAIN_PRINT("Main: DCC");
|
||||||
@ -1082,6 +1084,7 @@ bool Main::start() {
|
|||||||
|
|
||||||
ERR_FAIL_COND_V(!_start_success, false);
|
ERR_FAIL_COND_V(!_start_success, false);
|
||||||
|
|
||||||
|
bool hasicon = false;
|
||||||
bool editor = false;
|
bool editor = false;
|
||||||
String doc_tool;
|
String doc_tool;
|
||||||
List<String> removal_docs;
|
List<String> removal_docs;
|
||||||
@ -1519,8 +1522,10 @@ bool Main::start() {
|
|||||||
if (iconpath != "") {
|
if (iconpath != "") {
|
||||||
Ref<Image> icon;
|
Ref<Image> icon;
|
||||||
icon.instance();
|
icon.instance();
|
||||||
if (icon->load(iconpath) == OK)
|
if (icon->load(iconpath) == OK) {
|
||||||
OS::get_singleton()->set_icon(icon);
|
OS::get_singleton()->set_icon(icon);
|
||||||
|
hasicon = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1537,6 +1542,11 @@ bool Main::start() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hasicon) {
|
||||||
|
Ref<Image> icon = memnew(Image(app_icon_png));
|
||||||
|
OS::get_singleton()->set_icon(icon);
|
||||||
|
}
|
||||||
|
|
||||||
OS::get_singleton()->set_main_loop(main_loop);
|
OS::get_singleton()->set_main_loop(main_loop);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user