diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 5b049860204..32f36e01f9a 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1472,10 +1472,6 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"), 0); // 8K resolution GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true); -#ifdef TOOLS_ENABLED - GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor_hint", false); -#endif - GLOBAL_DEF("animation/warnings/check_invalid_track_paths", true); GLOBAL_DEF("animation/warnings/check_angle_interpolation_type_conflicting", true); diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 4438724d866..ef87fb5eddf 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -680,6 +680,9 @@ If [code]true[/code], (re)imports resources even if the editor window is unfocused or minimized. If [code]false[/code], resources are only (re)imported when the editor window is focused. This can be set to [code]true[/code] to speed up iteration by starting the import process earlier when saving files in the project folder. This also allows getting visual feedback on changes without having to click the editor window, which is useful with multi-monitor setups. The downside of setting this to [code]true[/code] is that it increases idle CPU usage and may steal CPU time from other applications when importing resources. + + If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. + If [code]true[/code], setting names in the editor are localized when possible. [b]Note:[/b] This setting affects most [EditorInspector]s in the editor UI, primarily Project Settings and Editor Settings. To control names displayed in the Inspector dock, use [member interface/inspector/default_property_name_style] instead. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 3d9e13b5174..30cbbbf7998 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -813,9 +813,6 @@ If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. - - Editor-only override for [member display/window/energy_saving/keep_screen_on]. Does not affect running project. - The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values. [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/viewport_width] and [member display/window/size/viewport_height] accordingly. diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index d19d4740eea..b2504e16705 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -740,6 +740,7 @@ void EditorNode::_notification(int p_what) { RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true); RenderingServer::get_singleton()->viewport_set_environment_mode(get_viewport()->get_viewport_rid(), RenderingServer::VIEWPORT_ENVIRONMENT_DISABLED); + DisplayServer::get_singleton()->screen_set_keep_on(EDITOR_GET("interface/editor/keep_screen_on")); feature_profile_manager->notify_changed(); @@ -838,6 +839,7 @@ void EditorNode::_notification(int p_what) { if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor")) { _update_update_spinner(); _update_vsync_mode(); + DisplayServer::get_singleton()->screen_set_keep_on(EDITOR_GET("interface/editor/keep_screen_on")); } #if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED) diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 4ff8b843d12..fe2fad0cb64 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -467,6 +467,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/show_update_spinner", 0, "Auto (Disabled),Enabled,Disabled") #endif + _initial_set("interface/editor/keep_screen_on", false); EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/low_processor_mode_sleep_usec", 6900, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) // Default unfocused usec sleep is for 10 FPS. Allow an unfocused FPS limit // as low as 1 FPS for those who really need low power usage (but don't need diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 3de9ebcfddf..55c361de4b8 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -93,6 +93,7 @@ void ProjectManager::_notification(int p_what) { } break; case NOTIFICATION_READY: { + DisplayServer::get_singleton()->screen_set_keep_on(EDITOR_GET("interface/editor/keep_screen_on")); const int default_sorting = (int)EDITOR_GET("project_manager/sorting_order"); filter_option->select(default_sorting); project_list->set_order_option(default_sorting);