[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
This commit is contained in:
Scott Romero
2022-02-16 10:37:36 -08:00
committed by GitHub
parent b9fd9a43c6
commit d119501760
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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,