diff options
author | sr55 <[email protected]> | 2013-09-17 21:06:20 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-09-17 21:06:20 +0000 |
commit | 20b4e6c65010d656dafdf5b3f17ad0fcb7057b22 (patch) | |
tree | 163edb712d0b062ee9e4dfd559dcb92ede9f156e /win/CS/HandBrake.ApplicationServices | |
parent | 5d487e5c023e9c5c8252b0449e007248bea0e8a9 (diff) |
WinGui: Remove the option to disable libhb features as it's now vital to have this dll present.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5785 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs | 21 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs index f316c85c6..0bf34b6a4 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs @@ -31,6 +31,11 @@ namespace HandBrake.ApplicationServices.Utilities /// </summary>
private static readonly string LogDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ /// <summary>
+ /// The is lib hb present.
+ /// </summary>
+ private static bool? isLibHbPresent;
+
#endregion
#region Properties
@@ -46,6 +51,22 @@ namespace HandBrake.ApplicationServices.Utilities }
}
+ /// <summary>
+ /// Gets a value indicating whether is lib hb present.
+ /// </summary>
+ public static bool IsLibHbPresent
+ {
+ get
+ {
+ if (isLibHbPresent == null)
+ {
+ isLibHbPresent = File.Exists(Path.Combine(Application.StartupPath, "hb.dll"));
+ }
+
+ return isLibHbPresent.Value;
+ }
+ }
+
#endregion
#region Public Methods
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs index 6eb669114..af4a57bcd 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs @@ -74,6 +74,11 @@ namespace HandBrake.ApplicationServices.Utilities {
try
{
+ if (!GeneralUtilities.IsLibHbPresent)
+ {
+ return false; // Feature is disabled.
+ }
+
return HBFunctions.hb_qsv_available() == 1;
}
catch (Exception)
|