You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Add a separate application focus/in notification out from Window focus notification.
This commit is contained in:
@@ -435,14 +435,14 @@ void EditorNode::_notification(int p_what) {
|
||||
/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_WM_FOCUS_IN: {
|
||||
case NOTIFICATION_APPLICATION_FOCUS_IN: {
|
||||
// Restore the original FPS cap after focusing back on the editor
|
||||
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec")));
|
||||
|
||||
EditorFileSystem::get_singleton()->scan_changes();
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_WM_FOCUS_OUT: {
|
||||
case NOTIFICATION_APPLICATION_FOCUS_OUT: {
|
||||
// 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")));
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user