From 22baff138b731e5fea4d3b95f1b0345a35a0524b Mon Sep 17 00:00:00 2001 From: gxalpha Date: Fri, 15 Jul 2022 02:55:03 +0200 Subject: [PATCH] mac-capture: Add deprecated flag to traditional captures if SCK exists Marking a source as deprecated will make it harder for users to find when creating a new source. We don't currently plan on removing traditional display and window capture, however ScreenCaptureKit will be the preferred capture method going forward. --- plugins/mac-capture/plugin-main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/mac-capture/plugin-main.c b/plugins/mac-capture/plugin-main.c index a89d0b30b..537ca5c83 100644 --- a/plugins/mac-capture/plugin-main.c +++ b/plugins/mac-capture/plugin-main.c @@ -18,13 +18,15 @@ bool obs_module_load(void) { obs_register_source(&coreaudio_input_capture_info); obs_register_source(&coreaudio_output_capture_info); - obs_register_source(&display_capture_info); - obs_register_source(&window_capture_info); -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120500 // __MAC_12_6 +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120500 // __MAC_12_5 if (is_screen_capture_available()) { extern struct obs_source_info screen_capture_info; obs_register_source(&screen_capture_info); + display_capture_info.output_flags |= OBS_SOURCE_DEPRECATED; + window_capture_info.output_flags |= OBS_SOURCE_DEPRECATED; } #endif + obs_register_source(&display_capture_info); + obs_register_source(&window_capture_info); return true; }