diff options
author | sr55 <[email protected]> | 2021-01-07 19:12:43 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2021-01-07 19:12:57 +0000 |
commit | 21247b289f81fee48338c805dccc776a69aa0d62 (patch) | |
tree | 423ae5c4131ad3d81b05ac93447e27d219c0583e /win | |
parent | 70920d85f4efb08eaea9e2ce073e884cdbc6be17 (diff) |
WinGui: Fix an issue with QSV adaptor Probe. It should not call when QSV is not compiled in. Fixes #3329
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs index fda32b6f7..597b1c207 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs @@ -17,6 +17,7 @@ namespace HandBrake.Interop.Interop using HandBrake.Interop.Interop.Helpers; using HandBrake.Interop.Interop.Model; using HandBrake.Interop.Interop.Model.Encoding; + using HandBrake.Interop.Utilities; public static class HandBrakeEncoderHelpers { @@ -714,11 +715,16 @@ namespace HandBrake.Interop.Interop public static List<int> GetQsvAdaptorList() { - IntPtr gpuListPtr = HBFunctions.hb_qsv_adapters_list(); + if (SystemInfo.IsQsvAvailable) + { + IntPtr gpuListPtr = HBFunctions.hb_qsv_adapters_list(); + + List<int> gpuList = InteropUtilities.ToListFromHandBrakeList<int>(gpuListPtr); - List<int> gpuList = InteropUtilities.ToListFromHandBrakeList<int>(gpuListPtr); + return gpuList; + } - return gpuList; + return new List<int>(); } } } |