mirror of
https://github.com/kyleneideck/BackgroundMusic
synced 2024-11-22 20:23:04 +00:00
Hide call to requestAccessForMediaType when compiling on macOS < 10.14.
This should fix the compilation error in BGMAppDelegate when compiling against a macOS SDK earlier than 10.14.
This commit is contained in:
parent
75e8d5ceac
commit
1a49802675
1 changed files with 7 additions and 1 deletions
|
@ -216,6 +216,9 @@ static NSString* const kOptShowDockIcon = @"--show-dock-icon";
|
|||
}
|
||||
};
|
||||
|
||||
// Skip this if we're compiling on a version of macOS before 10.14 as won't compile and it
|
||||
// isn't needed.
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 // MAC_OS_X_VERSION_10_14
|
||||
if (@available(macOS 10.14, *)) {
|
||||
// On macOS 10.14+ we need to get the user's permission to use input devices before we can
|
||||
// use BGMDevice for playthrough (see BGMPlayThrough), so we wait until they've given it
|
||||
|
@ -240,7 +243,10 @@ static NSString* const kOptShowDockIcon = @"--show-dock-icon";
|
|||
// with instructions.
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// We can change the device immediately on older versions of macOS because they don't
|
||||
// require user permission for input devices.
|
||||
setDefaultDevice();
|
||||
|
|
Loading…
Reference in a new issue