[development] fixes for targeting macOS Monterey (12.x) (#7666)

Targeting macOS 12.x fails to compile due to some named constants being deprecated and replaced

Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
monroegm-disable-blank-issue-2
Scott Romero 4 years ago committed by GitHub
parent b9fd9a43c6
commit d119501760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,8 +26,13 @@ QString graphicsCardName()
// Create an iterator
io_iterator_t iterator;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_12_0
if (IOServiceGetMatchingServices(kIOMainPortDefault,matchDict,
&iterator) == kIOReturnSuccess)
#else
if (IOServiceGetMatchingServices(kIOMasterPortDefault,matchDict,
&iterator) == kIOReturnSuccess)
#endif
{
// Iterator for devices found
io_registry_entry_t regEntry;

@ -84,7 +84,7 @@ public:
AudioObjectPropertyAddress theAddress = {
kAudioHardwarePropertyDefaultInputDevice,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster
kAudioObjectPropertyElementMain
};
status = AudioObjectGetPropertyData(kAudioObjectSystemObject,

Loading…
Cancel
Save