diff options
author | sr55 <[email protected]> | 2019-04-06 15:41:04 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-04-06 15:41:04 +0100 |
commit | 8065029c806e5e50e2ef7828f0ee1edf96c41031 (patch) | |
tree | 8e74496b38eb76f104c1883573fb78f5f13f7973 /win/CS/HandBrakeWPF/Utilities | |
parent | 42594b81c948bd55c862c680e8af5e2618989127 (diff) |
WinGui: Add "hardware.enabled" option to portable.ini
Diffstat (limited to 'win/CS/HandBrakeWPF/Utilities')
-rw-r--r-- | win/CS/HandBrakeWPF/Utilities/Portable.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Utilities/Portable.cs b/win/CS/HandBrakeWPF/Utilities/Portable.cs index 2cfbce6e9..ecde42d82 100644 --- a/win/CS/HandBrakeWPF/Utilities/Portable.cs +++ b/win/CS/HandBrakeWPF/Utilities/Portable.cs @@ -177,6 +177,22 @@ namespace HandBrakeWPF.Utilities return true; } + public static bool IsHardwareEnabled() + { + if (keyPairs.ContainsKey("hardware.enabled")) + { + string hardwareEnabled = keyPairs["hardware.enabled"]; + if (!string.IsNullOrEmpty(hardwareEnabled) && hardwareEnabled.Trim() == "true") + { + return true; + } + + return false; + } + + return true; // Default to On. + } + /// <summary> /// The get temp directory. /// </summary> |