mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
UI: Don't create default desktop audio source on macOS 13+
This commit is contained in:
@@ -133,6 +133,15 @@ 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
|
||||
|
||||
@@ -104,6 +104,7 @@ void InstallNSApplicationSubclass();
|
||||
void InstallNSThreadLocks();
|
||||
void disableColorSpaceConversion(QWidget *window);
|
||||
void SetMacOSDarkMode(bool dark);
|
||||
bool shouldCreateDefaultAudioSource();
|
||||
|
||||
MacPermissionStatus CheckPermissionWithPrompt(MacPermissionType type,
|
||||
bool prompt_for_permission);
|
||||
|
||||
@@ -997,6 +997,10 @@ void OBSBasic::CreateFirstRunSources()
|
||||
bool hasDesktopAudio = HasAudioDevices(App()->OutputAudioSource());
|
||||
bool hasInputAudio = HasAudioDevices(App()->InputAudioSource());
|
||||
|
||||
#ifdef __APPLE__
|
||||
hasDesktopAudio = hasDesktopAudio && shouldCreateDefaultAudioSource();
|
||||
#endif
|
||||
|
||||
if (hasDesktopAudio)
|
||||
ResetAudioDevice(App()->OutputAudioSource(), "default",
|
||||
Str("Basic.DesktopDevice1"), 1);
|
||||
|
||||
Reference in New Issue
Block a user