From d11950176002f8dded5714925f1ea5a166e08b8f Mon Sep 17 00:00:00 2001 From: Scott Romero <24445312+AMZN-ScottR@users.noreply.github.com> Date: Wed, 16 Feb 2022 10:37:36 -0800 Subject: [PATCH] [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 --- Code/Editor/LogFile_mac.mm | 5 +++++ .../Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Code/Editor/LogFile_mac.mm b/Code/Editor/LogFile_mac.mm index fb227314ad..3471f29958 100644 --- a/Code/Editor/LogFile_mac.mm +++ b/Code/Editor/LogFile_mac.mm @@ -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; diff --git a/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm b/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm index 567f2db6b2..fe556f6d07 100644 --- a/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm +++ b/Gems/Microphone/Code/Source/Platform/Mac/MicrophoneSystemComponent_Mac.mm @@ -84,7 +84,7 @@ public: AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData(kAudioObjectSystemObject,