Skip to content

Commit

Permalink
Merge pull request #59665 from lyuma/editor_normal_priority
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Mar 29, 2022
2 parents 01a3b84 + ee02a7f commit ab24fb2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ab24fb2

Please sign in to comment.