|
@@ -47,6 +47,11 @@
|
|
|
#include <IOKit/IOKitLib.h>
|
|
|
#include <IOKit/hid/IOHIDDevice.h>
|
|
|
#include <IOKit/usb/USBSpec.h>
|
|
|
+#include <AvailabilityMacros.h>
|
|
|
+/* Things named "Master" were renamed to "Main" in macOS 12.0's SDK. */
|
|
|
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 120000
|
|
|
+#define kIOMainPortDefault kIOMasterPortDefault
|
|
|
+#endif
|
|
|
#endif
|
|
|
|
|
|
#include "../core/linux/SDL_udev.h"
|
|
@@ -250,7 +255,7 @@ HIDAPI_InitializeDiscovery()
|
|
|
#endif /* defined(__WIN32__) || defined(__WINGDK__) */
|
|
|
|
|
|
#if defined(__MACOSX__)
|
|
|
- SDL_HIDAPI_discovery.m_notificationPort = IONotificationPortCreate(kIOMasterPortDefault);
|
|
|
+ SDL_HIDAPI_discovery.m_notificationPort = IONotificationPortCreate(kIOMainPortDefault);
|
|
|
if (SDL_HIDAPI_discovery.m_notificationPort) {
|
|
|
{
|
|
|
io_iterator_t portIterator = 0;
|