Преглед на файлове

UI: Add "Below Normal" priority option

Richard Stanway преди 8 години
родител
ревизия
d69652503b
променени са 3 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 1 0
      UI/data/locale/en-US.ini
  2. 2 0
      UI/platform-windows.cpp
  3. 1 0
      UI/window-basic-settings.cpp

+ 1 - 0
UI/data/locale/en-US.ini

@@ -689,6 +689,7 @@ Basic.Settings.Advanced.General.ProcessPriority="Process Priority"
 Basic.Settings.Advanced.General.ProcessPriority.High="High"
 Basic.Settings.Advanced.General.ProcessPriority.AboveNormal="Above Normal"
 Basic.Settings.Advanced.General.ProcessPriority.Normal="Normal"
+Basic.Settings.Advanced.General.ProcessPriority.BelowNormal="Below Normal"
 Basic.Settings.Advanced.General.ProcessPriority.Idle="Idle"
 Basic.Settings.Advanced.FormatWarning="Warning:  Color formats other than NV12 are primarily intended for recording, and are not recommended when streaming.  Streaming may incur increased CPU usage due to color format conversion."
 Basic.Settings.Advanced.Audio.BufferingTime="Audio Buffering Time"

+ 2 - 0
UI/platform-windows.cpp

@@ -212,6 +212,8 @@ void SetProcessPriority(const char *priority)
 		SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);
 	else if (strcmp(priority, "Normal") == 0)
 		SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
+	else if (strcmp(priority, "BelowNormal") == 0)
+		SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
 	else if (strcmp(priority, "Idle") == 0)
 		SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
 }

+ 1 - 0
UI/window-basic-settings.cpp

@@ -467,6 +467,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
 		PROCESS_PRIORITY("High"),
 		PROCESS_PRIORITY("AboveNormal"),
 		PROCESS_PRIORITY("Normal"),
+		PROCESS_PRIORITY("BelowNormal"),
 		PROCESS_PRIORITY("Idle")
 	};
 #undef PROCESS_PRIORITY