diff options
author | Scott <[email protected]> | 2015-10-31 17:40:57 +0000 |
---|---|---|
committer | Scott <[email protected]> | 2015-10-31 17:40:57 +0000 |
commit | e0f9ebd0b84ed438e6b11966867c07d29a07d78c (patch) | |
tree | 7b159a7ec658a1948b29fa487fb474c9fd86a45d /win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | |
parent | 19f3dc6e8f6f8ee25ef99526276d400753aaa0a7 (diff) |
Make Process Priority a real-time setting. Not per encode instance.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 4d7ea3a80..3e37a8a85 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -633,7 +633,30 @@ namespace HandBrakeWPF.ViewModels set
{
this.selectedPriority = value;
- this.NotifyOfPropertyChange("SelectedPriority");
+ this.NotifyOfPropertyChange();
+
+ // Set the Process Priority
+ switch (value)
+ {
+ case "Realtime":
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
+ break;
+ case "High":
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;
+ break;
+ case "Above Normal":
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;
+ break;
+ case "Normal":
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;
+ break;
+ case "Low":
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle;
+ break;
+ default:
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;
+ break;
+ }
}
}
#endregion
|