浏览代码

mac-videotoolbox: Remove guard for hardware acceleration check

PatTheMav 3 年之前
父节点
当前提交
a001f97e3c
共有 1 个文件被更改,包括 7 次插入9 次删除
  1. 7 9
      plugins/mac-videotoolbox/encoder.c

+ 7 - 9
plugins/mac-videotoolbox/encoder.c

@@ -1086,15 +1086,13 @@ bool obs_module_load(void)
 		VT_DICTSTR(kVTVideoEncoderList_EncoderID, id);
 		VT_DICTSTR(kVTVideoEncoderList_EncoderID, id);
 		VT_DICTSTR(kVTVideoEncoderList_DisplayName, disp_name);
 		VT_DICTSTR(kVTVideoEncoderList_DisplayName, disp_name);
 
 
-		bool hardware_accelerated = false;
-		if (__builtin_available(macOS 10.14, *)) {
-			CFBooleanRef hardware_ref = CFDictionaryGetValue(
-				encoder_dict,
-				kVTVideoEncoderList_IsHardwareAccelerated);
-			if (hardware_ref)
-				hardware_accelerated =
-					CFBooleanGetValue(hardware_ref);
-		}
+		CFBooleanRef hardware_ref = CFDictionaryGetValue(
+			encoder_dict,
+			kVTVideoEncoderList_IsHardwareAccelerated);
+
+		bool hardware_accelerated =
+			(hardware_ref) ? CFBooleanGetValue(hardware_ref)
+				       : false;
 
 
 		info.id = id;
 		info.id = id;
 		struct vt_encoder_type_data *type_data =
 		struct vt_encoder_type_data *type_data =