Fix a few property warnings on Globals access
Hand-picked from 515f92d03b
.
This commit is contained in:
parent
9b1ee4cd66
commit
fec8e2549c
@ -6313,7 +6313,10 @@ EditorNode::EditorNode() {
|
||||
{
|
||||
|
||||
_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++) {
|
||||
set_addon_plugin_enabled(addons[i], true);
|
||||
|
@ -412,7 +412,7 @@ void EditorSettings::setup_network() {
|
||||
IP::get_singleton()->get_local_addresses(&local_ip);
|
||||
String lip;
|
||||
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;
|
||||
|
||||
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");
|
||||
if (!force_res && use_custom_res && globals->has("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;
|
||||
}
|
||||
if (use_custom_res && globals->has("display/fullscreen"))
|
||||
|
Loading…
Reference in New Issue
Block a user