diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-29 15:31:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 15:31:50 +0200 |
commit | ab24fb226da64b99938ffdc43e782c5140ee3f7c (patch) | |
tree | fe6579619af3a2e812fac42a7974898bab0ccebf | |
parent | 01a3b84545d7c2ac12d7c91897177906839e8743 (diff) | |
parent | ee02a7f785b672304346028bc500949050432fa5 (diff) |
Merge pull request #59665 from lyuma/editor_normal_priority
-rw-r--r-- | platform/windows/display_server_windows.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 16323dcc13..d73239614f 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -3626,7 +3626,11 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win } #endif - if (!OS::get_singleton()->is_in_low_processor_usage_mode()) { + if (!Engine::get_singleton()->is_editor_hint() && !OS::get_singleton()->is_in_low_processor_usage_mode()) { + // Increase priority for projects that are not in low-processor mode (typically games) + // to reduce the risk of frame stuttering. + // This is not done for the editor to prevent importers or resource bakers + // from making the system unresponsive. SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS); DWORD index = 0; HANDLE handle = AvSetMmThreadCharacteristics("Games", &index); |