diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index 89580bfa..70c75aa3 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -58,7 +58,7 @@ static char* getMonitorName(CGDirectDisplayID displayID, NSScreen* screen) io_service_t service; CFDictionaryRef info; - if (IOServiceGetMatchingServices(kIOMainPortDefault, + if (IOServiceGetMatchingServices(MACH_PORT_NULL, IOServiceMatching("IODisplayConnect"), &it) != 0) { @@ -231,7 +231,7 @@ static double getFallbackRefreshRate(CGDirectDisplayID displayID) io_iterator_t it; io_service_t service; - if (IOServiceGetMatchingServices(kIOMainPortDefault, + if (IOServiceGetMatchingServices(MACH_PORT_NULL, IOServiceMatching("IOFramebuffer"), &it) != 0) { diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index ed4ffc12..67c1a3cc 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -41,13 +41,6 @@ typedef void* id; #endif -// NOTE: Many Cocoa enum values have been renamed and we need to build across -// SDK versions where one is unavailable or the other deprecated -// We use the newer names in code and these macros to handle compatibility -#if MAC_OS_X_VERSION_MAX_ALLOWED < 120000 - #define kIOMainPortDefault kIOMasterPortDefault -#endif - // NOTE: Many Cocoa enum values have been renamed and we need to build across // SDK versions where one is unavailable or the other deprecated // We use the newer names in code and these macros to handle compatibility