Browse Source

mac-videotoolbox: Remove guard for hardware acceleration check

PatTheMav 3 years ago
parent
commit
a001f97e3c
1 changed files with 7 additions and 9 deletions
  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_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;
 		struct vt_encoder_type_data *type_data =