You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Fix a few property warnings on Globals access
Hand-picked from 515f92d03b.
This commit is contained in:
@@ -6313,7 +6313,10 @@ EditorNode::EditorNode() {
|
|||||||
{
|
{
|
||||||
|
|
||||||
_initializing_addons = true;
|
_initializing_addons = true;
|
||||||
Vector<String> addons = Globals::get_singleton()->get("editor_plugins/enabled");
|
Vector<String> addons;
|
||||||
|
if (Globals::get_singleton()->has("editor_plugins/enabled")) {
|
||||||
|
addons = Globals::get_singleton()->get("editor_plugins/enabled");
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < addons.size(); i++) {
|
for (int i = 0; i < addons.size(); i++) {
|
||||||
set_addon_plugin_enabled(addons[i], true);
|
set_addon_plugin_enabled(addons[i], true);
|
||||||
|
|||||||
@@ -412,7 +412,7 @@ void EditorSettings::setup_network() {
|
|||||||
IP::get_singleton()->get_local_addresses(&local_ip);
|
IP::get_singleton()->get_local_addresses(&local_ip);
|
||||||
String lip;
|
String lip;
|
||||||
String hint;
|
String hint;
|
||||||
String current = get("network/debug_host");
|
String current = has("network/debug_host") ? get("network/debug_host") : "";
|
||||||
int port = has("network/debug_port") ? (int)get("network/debug_port") : 6007;
|
int port = has("network/debug_port") ? (int)get("network/debug_port") : 6007;
|
||||||
|
|
||||||
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
|
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||||||
video_mode.width = globals->get("display/width");
|
video_mode.width = globals->get("display/width");
|
||||||
if (!force_res && use_custom_res && globals->has("display/height"))
|
if (!force_res && use_custom_res && globals->has("display/height"))
|
||||||
video_mode.height = globals->get("display/height");
|
video_mode.height = globals->get("display/height");
|
||||||
if (!editor && (!bool(globals->get("display/allow_hidpi")) || force_lowdpi)) {
|
if (!editor && ((globals->has("display/allow_hidpi") && !globals->get("display/allow_hidpi")) || force_lowdpi)) {
|
||||||
OS::get_singleton()->_allow_hidpi = false;
|
OS::get_singleton()->_allow_hidpi = false;
|
||||||
}
|
}
|
||||||
if (use_custom_res && globals->has("display/fullscreen"))
|
if (use_custom_res && globals->has("display/fullscreen"))
|
||||||
|
|||||||
Reference in New Issue
Block a user