summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-05-13 20:07:52 +0000
committersr55 <[email protected]>2009-05-13 20:07:52 +0000
commit8e57aaf22e7b27ea5c56b1a689a6226b858b8c2a (patch)
tree18ed9535195b8a02622d88540d9b16c6e00a4a56 /win/C#/Functions
parent43b29fa60d2d30aa1802a7b913436f86cfe3d73f (diff)
WinGui:
- Fix Activity Log window not updating for scan log - Fix Process Affinity not being set for encodes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2417 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Encode.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/win/C#/Functions/Encode.cs b/win/C#/Functions/Encode.cs
index a6bfd263a..d5c6577e5 100644
--- a/win/C#/Functions/Encode.cs
+++ b/win/C#/Functions/Encode.cs
@@ -49,27 +49,31 @@ namespace Handbrake.Functions
isEncoding = true;
currentQuery = query;
- // Set the process Priority
- if (hbProc != null)
+ // Set the process Priority
+ Process hbCliProcess = null;
+ if (processID != -1)
+ hbCliProcess = Process.GetProcessById(processID);
+
+ if (hbCliProcess != null)
switch (Properties.Settings.Default.processPriority)
{
case "Realtime":
- hbProc.PriorityClass = ProcessPriorityClass.RealTime;
+ hbCliProcess.PriorityClass = ProcessPriorityClass.RealTime;
break;
case "High":
- hbProc.PriorityClass = ProcessPriorityClass.High;
+ hbCliProcess.PriorityClass = ProcessPriorityClass.High;
break;
case "Above Normal":
- hbProc.PriorityClass = ProcessPriorityClass.AboveNormal;
+ hbCliProcess.PriorityClass = ProcessPriorityClass.AboveNormal;
break;
case "Normal":
- hbProc.PriorityClass = ProcessPriorityClass.Normal;
+ hbCliProcess.PriorityClass = ProcessPriorityClass.Normal;
break;
case "Low":
- hbProc.PriorityClass = ProcessPriorityClass.Idle;
+ hbCliProcess.PriorityClass = ProcessPriorityClass.Idle;
break;
default:
- hbProc.PriorityClass = ProcessPriorityClass.BelowNormal;
+ hbCliProcess.PriorityClass = ProcessPriorityClass.BelowNormal;
break;
}
}