summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Parsing/Title.cs24
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs4
3 files changed, 25 insertions, 9 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
index d6e6e57aa..466a33aa1 100644
--- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
+++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs
@@ -142,6 +142,7 @@ namespace HandBrake.ApplicationServices.Parsing
{
var thisTitle = new Title();
string nextLine = output.ReadLine();
+ string temp;
// Get the Title Number
Match m = Regex.Match(nextLine, @"^\+ title ([0-9]*):");
@@ -223,12 +224,27 @@ namespace HandBrake.ApplicationServices.Parsing
};
}
- m = Regex.Match(output.ReadLine(), @"^ \+ support opencl: ([0-9]*)");
+ nextLine = output.ReadLine();
+ m = Regex.Match(nextLine, @"^ \+ support opencl:");
if (m.Success)
- thisTitle.OpenCLSupport = int.Parse(m.Groups[1].Value.Trim());
- m = Regex.Match(output.ReadLine(), @" \+ support uvd: ([0-9]*)");
+ {
+ temp = nextLine.Replace("+ support opencl:", string.Empty).Trim();
+ if (string.Compare(temp, "yes") == 0)
+ thisTitle.OpenCLSupport = 1;
+ else
+ thisTitle.OpenCLSupport = 0;
+ }
+
+ nextLine = output.ReadLine();
+ m = Regex.Match(nextLine, @"^ \+ support uvd:");
if (m.Success)
- thisTitle.UVDSupport = int.Parse(m.Groups[1].Value.Trim());
+ {
+ temp = nextLine.Replace("+ support uvd:", string.Empty).Trim();
+ if (string.Compare(temp, "yes") == 0)
+ thisTitle.UVDSupport = 1;
+ else
+ thisTitle.UVDSupport = 0;
+ }
thisTitle.Chapters.AddRange(Chapter.ParseList(output));
thisTitle.AudioTracks.AddRange(AudioHelper.ParseList(output));
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
index ca23b3c66..69cbfc258 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
@@ -245,10 +245,10 @@ namespace HandBrake.ApplicationServices.Utilities
if (task.OpenCLSupport)
query += " -P ";
- if (task.UVDSupport && task.OpenCLSupport)
+
+ if (task.UVDSupport)
query += " -U ";
- else if (task.UVDSupport && !task.OpenCLSupport)
- query += " -P -U";
+
return query;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 0a0cfe02d..6d2e736a3 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1721,11 +1721,11 @@ namespace HandBrakeWPF.ViewModels
{
if (this.selectedTitle.OpenCLSupport == 0)
{
- this.SupportOpenCL = false;
+ this.SupportOpenCL = true;
}
else
{
- this.SupportOpenCL = true;
+ this.SupportOpenCL = false;
}
if (this.selectedTitle.UVDSupport == 0)
{