From a001f97e3cb12f156e5cc670daa7c5c493e7dd94 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Thu, 28 Jul 2022 20:25:58 +0200 Subject: [PATCH] mac-videotoolbox: Remove guard for hardware acceleration check --- plugins/mac-videotoolbox/encoder.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/mac-videotoolbox/encoder.c b/plugins/mac-videotoolbox/encoder.c index e319a2dee..a3326347e 100644 --- a/plugins/mac-videotoolbox/encoder.c +++ b/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 =