From: sr55 Date: Fri, 6 Jul 2007 16:11:06 +0000 (+0000) Subject: WinGui: X-Git-Tag: 0.9.0~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=260622d9229cdde3bd9c70eb046330ac4a0e4f7e;p=handbrake WinGui: - Another small change to hbcli execution that was missed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@655 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/Handbrake/frmQueue.vb b/win/Handbrake/frmQueue.vb index a49b015bc..5c580d0ac 100644 --- a/win/Handbrake/frmQueue.vb +++ b/win/Handbrake/frmQueue.vb @@ -88,7 +88,27 @@ Public Class frmQueue Else 'Start the encode process Try - Shell("""" + ApplicationPath + "\hbcli.exe""" + list_queue.Items.Item(encodeItems)) + Dim params As String = list_queue.Items.Item(encodeItems) + Dim proc As New System.Diagnostics.Process + proc = System.Diagnostics.Process.Start("""" + ApplicationPath + "\hbcli.exe""", params) + + If My.Settings.Priority <> "Normal" Then + Dim level As String + level = My.Settings.Priority + + Select Case level + Case "Realtime" + proc.PriorityClass = ProcessPriorityClass.RealTime + Case "High" + proc.PriorityClass = ProcessPriorityClass.High + Case "Above Normal" + proc.PriorityClass = ProcessPriorityClass.AboveNormal + Case "Below Normal" + proc.PriorityClass = ProcessPriorityClass.BelowNormal + Case "Low" + proc.PriorityClass = ProcessPriorityClass.Idle + End Select + End If Catch ex As Exception MessageBox.Show("Unable to launch the encoder. Queue run failed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand) MessageBox.Show(ex.ToString)