summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-05-13 09:25:09 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-05-13 09:25:09 +0300
commit11ccfad1aabec468fd92e1b567f3f9d94b5acc4b (patch)
tree03f76795e046d4fd94b8f486709ddd638648d1c9 /main/main.cpp
parentb283447bfd5c8d1f6a6566bda57f89c1b87a3e0e (diff)
[macOS] Prefer .app bundle icon over the default one.
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 67d8d93728..61864290b3 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1696,8 +1696,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
#ifdef TOOLS_ENABLED
- Ref<Image> icon = memnew(Image(app_icon_png));
- DisplayServer::get_singleton()->set_icon(icon);
+ if (OS::get_singleton()->get_bundle_icon_path().is_empty()) {
+ Ref<Image> icon = memnew(Image(app_icon_png));
+ DisplayServer::get_singleton()->set_icon(icon);
+ }
#endif
}
@@ -2391,7 +2393,7 @@ bool Main::start() {
#endif
}
- if (!hasicon) {
+ if (!hasicon && OS::get_singleton()->get_bundle_icon_path().is_empty()) {
Ref<Image> icon = memnew(Image(app_icon_png));
DisplayServer::get_singleton()->set_icon(icon);
}