diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-02 17:26:18 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-02 17:26:18 +0200 |
commit | 8623572b1f1843d406f788fe4331d6c445e72c6c (patch) | |
tree | bf2abea1b15617cc245f6647b17509acb11f59c6 /main | |
parent | 5c2bb20f3dbc1d962d86566e3a77b222f75d17c1 (diff) | |
parent | c8cbc671566d832d5664281fee7bee1f871c3969 (diff) | |
download | redot-engine-8623572b1f1843d406f788fe4331d6c445e72c6c.tar.gz |
Merge pull request #75666 from ronyeh/main.cpp-2
Rename `iconpath` => `icon_path` & `hasicon` => `has_icon`.
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/main/main.cpp b/main/main.cpp index 68c977e9b7..ef997e71a7 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2562,7 +2562,7 @@ static MainTimerSync main_timer_sync; bool Main::start() { ERR_FAIL_COND_V(!_start_success, false); - bool hasicon = false; + bool has_icon = false; String positional_arg; String game_path; String script; @@ -3192,28 +3192,28 @@ bool Main::start() { sml->add_current_scene(scene); #ifdef MACOS_ENABLED - String mac_iconpath = GLOBAL_GET("application/config/macos_native_icon"); - if (!mac_iconpath.is_empty()) { - DisplayServer::get_singleton()->set_native_icon(mac_iconpath); - hasicon = true; + String mac_icon_path = GLOBAL_GET("application/config/macos_native_icon"); + if (!mac_icon_path.is_empty()) { + DisplayServer::get_singleton()->set_native_icon(mac_icon_path); + has_icon = true; } #endif #ifdef WINDOWS_ENABLED - String win_iconpath = GLOBAL_GET("application/config/windows_native_icon"); - if (!win_iconpath.is_empty()) { - DisplayServer::get_singleton()->set_native_icon(win_iconpath); - hasicon = true; + String win_icon_path = GLOBAL_GET("application/config/windows_native_icon"); + if (!win_icon_path.is_empty()) { + DisplayServer::get_singleton()->set_native_icon(win_icon_path); + has_icon = true; } #endif - String iconpath = GLOBAL_GET("application/config/icon"); - if ((!iconpath.is_empty()) && (!hasicon)) { + String icon_path = GLOBAL_GET("application/config/icon"); + if ((!icon_path.is_empty()) && (!has_icon)) { Ref<Image> icon; icon.instantiate(); - if (ImageLoader::load_image(iconpath, icon) == OK) { + if (ImageLoader::load_image(icon_path, icon) == OK) { DisplayServer::get_singleton()->set_icon(icon); - hasicon = true; + has_icon = true; } } } @@ -3241,7 +3241,7 @@ bool Main::start() { #endif } - if (!hasicon && OS::get_singleton()->get_bundle_icon_path().is_empty()) { + if (!has_icon && OS::get_singleton()->get_bundle_icon_path().is_empty()) { Ref<Image> icon = memnew(Image(app_icon_png)); DisplayServer::get_singleton()->set_icon(icon); } |