Embedding game process in editor

This commit is contained in:
Hilderin
2024-09-25 16:57:23 -04:00
parent fafc07335b
commit 9d2a4c03be
44 changed files with 1712 additions and 134 deletions

View File

@ -755,7 +755,9 @@ void EditorNode::_notification(int p_what) {
}
// Set a low FPS cap to decrease CPU/GPU usage while the editor is unfocused.
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/unfocused_low_processor_mode_sleep_usec")));
if (unfocused_low_processor_usage_mode_enabled) {
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/unfocused_low_processor_mode_sleep_usec")));
}
} break;
case NOTIFICATION_WM_ABOUT: {
@ -6733,6 +6735,10 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
return eta.exitcode;
}
void EditorNode::set_unfocused_low_processor_usage_mode_enabled(bool p_enabled) {
unfocused_low_processor_usage_mode_enabled = p_enabled;
}
EditorNode::EditorNode() {
DEV_ASSERT(!singleton);
singleton = this;