Skip to content

Commit

Permalink
UI: Inline macOS 13 check
Browse files Browse the repository at this point in the history
  • Loading branch information
gxalpha authored and RytoEX committed Aug 24, 2024
1 parent 200abd3 commit ec5f499
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
9 changes: 0 additions & 9 deletions UI/platform-osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,6 @@ void SetAlwaysOnTop(QWidget *window, bool enable)
window->show();
}

bool shouldCreateDefaultAudioSource(void)
{
if (@available(macOS 13, *)) {
return false;
} else {
return true;
}
}

bool SetDisplayAffinitySupported(void)
{
// Not implemented yet
Expand Down
1 change: 0 additions & 1 deletion UI/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ void InstallNSApplicationSubclass();
void InstallNSThreadLocks();
void disableColorSpaceConversion(QWidget *window);
void SetMacOSDarkMode(bool dark);
bool shouldCreateDefaultAudioSource();

MacPermissionStatus CheckPermissionWithPrompt(MacPermissionType type,
bool prompt_for_permission);
Expand Down
6 changes: 5 additions & 1 deletion UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,11 @@ void OBSBasic::CreateFirstRunSources()
bool hasInputAudio = HasAudioDevices(App()->InputAudioSource());

#ifdef __APPLE__
hasDesktopAudio = hasDesktopAudio && shouldCreateDefaultAudioSource();
/* On macOS 13 and above, the SCK based audio capture provides a
* better alternative to the device-based audio capture. */
if (__builtin_available(macOS 13.0, *)) {
hasDesktopAudio = false;
}
#endif

if (hasDesktopAudio)
Expand Down

0 comments on commit ec5f499

Please sign in to comment.