diff options
-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>(); } } } |