diff options
Diffstat (limited to 'core/config')
-rw-r--r-- | core/config/engine.cpp | 12 | ||||
-rw-r--r-- | core/config/engine.h | 4 | ||||
-rw-r--r-- | core/config/project_settings.cpp | 10 |
3 files changed, 21 insertions, 5 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp index 782d369ae6..1a6093869f 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -194,11 +194,11 @@ bool Engine::is_validation_layers_enabled() const { } void Engine::set_print_error_messages(bool p_enabled) { - _print_error_enabled = p_enabled; + CoreGlobals::print_error_enabled = p_enabled; } bool Engine::is_printing_error_messages() const { - return _print_error_enabled; + return CoreGlobals::print_error_enabled; } void Engine::add_singleton(const Singleton &p_singleton) { @@ -246,6 +246,14 @@ void Engine::get_singletons(List<Singleton> *p_singletons) { } } +String Engine::get_write_movie_path() const { + return write_movie_path; +} + +void Engine::set_write_movie_path(const String &p_path) { + write_movie_path = p_path; +} + void Engine::set_shader_cache_path(const String &p_path) { shader_cache_path = p_path; } diff --git a/core/config/engine.h b/core/config/engine.h index 82e3ee5487..68562643e7 100644 --- a/core/config/engine.h +++ b/core/config/engine.h @@ -76,6 +76,7 @@ private: static Engine *singleton; + String write_movie_path; String shader_cache_path; public: @@ -138,6 +139,9 @@ public: Dictionary get_license_info() const; String get_license_text() const; + void set_write_movie_path(const String &p_path); + String get_write_movie_path() const; + void set_shader_cache_path(const String &p_path); String get_shader_cache_path() const; diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 7145e628c1..5c4bcc687a 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -488,7 +488,7 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b // We need to test both possibilities as extensions for Linux binaries are optional // (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck'). -#ifdef OSX_ENABLED +#ifdef MACOS_ENABLED if (!found) { // Attempt to load PCK from macOS .app bundle resources. found = _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_basename + ".pck")) || _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_filename + ".pck")); @@ -511,8 +511,9 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b if (found) { Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary"); if (err == OK && !p_ignore_override) { - // Load override from location of the executable. - // Optional, we don't mind if it fails. + // Load overrides from the PCK and the executable location. + // Optional, we don't mind if either fails. + _load_settings_text("res://override.cfg"); _load_settings_text(exec_path.get_base_dir().plus_file("override.cfg")); } return err; @@ -1197,6 +1198,9 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("display/window/size/window_height_override", 0); custom_prop_info["display/window/size/window_height_override"] = PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"); // 8K resolution + GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true); + GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor", false); + GLOBAL_DEF_BASIC("audio/buses/default_bus_layout", "res://default_bus_layout.tres"); custom_prop_info["audio/buses/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"); GLOBAL_DEF_RST("audio/general/2d_panning_strength", 1.0f); |