summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
index 32328ab47..99ab990ca 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
@@ -9,6 +9,7 @@
namespace HandBrake.ApplicationServices.Utilities
{
+ using System.Text.RegularExpressions;
using System.Windows.Forms;
using Microsoft.Win32;
@@ -56,5 +57,35 @@ namespace HandBrake.ApplicationServices.Utilities
{
get { return Screen.PrimaryScreen; }
}
+
+ /// <summary>
+ /// Gets a value indicating whether is hsw or newer.
+ /// </summary>
+ public static bool IsHswOrNewer
+ {
+ get
+ {
+ // TODO replace with a call to libhb
+ string cpu = GetCpuCount.ToString();
+ if (cpu.Contains("Intel"))
+ {
+ Match match = Regex.Match(cpu, "([0-9]{4})");
+ if (match.Success)
+ {
+ string cpuId = match.Groups[0].ToString();
+ int cpuNumber;
+ if (int.TryParse(cpuId, out cpuNumber))
+ {
+ if (cpuNumber > 4000)
+ {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+ }
}
} \ No newline at end of file