mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-28 14:47:13 +01:00
Keep editor at normal priority on windows.
The multithreaded importer often causes system-wide hangs when importing more than 20 files at a time. Running the editor at normal priority allows other applications on the system to be responsive during long imports. (cherry picked from commit ee02a7f785b672304346028bc500949050432fa5)
This commit is contained in:
parent
8275f6b161
commit
3554a0aa81
@ -1604,8 +1604,11 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
|
||||
|
||||
set_ime_active(false);
|
||||
|
||||
if (!OS::get_singleton()->is_in_low_processor_usage_mode()) {
|
||||
//SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user