mac: Fix handling of deprecated symbol.

This needs to check what our deployment target is, not what SDK
is available, since this is a linker symbol and not an enum
value or whatever.

Also removed a copy/paste error that mentioned CoreAudio in
the haptic subsystem.

Fixes #6534.
This commit is contained in:
Ryan C. Gordon
2022-11-16 22:02:21 -05:00
parent 913e403f2a
commit bb0b8adacc
2 changed files with 7 additions and 4 deletions

View File

@@ -20,12 +20,10 @@
*/
/* Things named "Master" were renamed to "Main" in macOS 12.0's SDK. */
#if MACOSX_COREAUDIO
#include <AvailabilityMacros.h>
#ifndef MAC_OS_VERSION_12_0
#if MAC_OS_X_VERSION_MIN_REQUIRED < 120000
#define kIOMainPortDefault kIOMasterPortDefault
#endif
#endif
extern int MacHaptic_MaybeAddDevice( io_object_t device );
extern int MacHaptic_MaybeRemoveDevice( io_object_t device );