diff -r 2df4c896e30c include/SDL_video.h --- a/include/SDL_video.h Tue Jul 11 19:27:50 2017 -0700 +++ b/include/SDL_video.h Wed Jul 12 12:45:25 2017 -0600 @@ -53,8 +53,8 @@ typedef struct { Uint32 format; /**< pixel format */ - int w; /**< width, in screen coordinates */ - int h; /**< height, in screen coordinates */ + int w; /**< width, in pixels */ + int h; /**< height, in pixels */ int refresh_rate; /**< refresh rate (or zero for unspecified) */ void *driverdata; /**< driver-specific data, initialize to 0 */ } SDL_DisplayMode; diff -r 2df4c896e30c src/video/cocoa/SDL_cocoamodes.m --- a/src/video/cocoa/SDL_cocoamodes.m Tue Jul 11 19:27:50 2017 -0700 +++ b/src/video/cocoa/SDL_cocoamodes.m Wed Jul 12 12:45:25 2017 -0600 @@ -108,6 +108,7 @@ int bpp = 0; int refreshRate = 0; CFStringRef fmt; + const SDL_bool macos10_8_or_later = floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_7; data = (SDL_DisplayModeData *) SDL_malloc(sizeof(*data)); if (!data) { @@ -116,8 +117,19 @@ data->moderef = vidmode; fmt = CGDisplayModeCopyPixelEncoding(vidmode); + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 + if (macos10_8_or_later) { + width = (int) CGDisplayModeGetPixelWidth(vidmode); + height = (int) CGDisplayModeGetPixelHeight(vidmode); + } else { + width = (int) CGDisplayModeGetWidth(vidmode); + height = (int) CGDisplayModeGetHeight(vidmode); + } +#else width = (int) CGDisplayModeGetWidth(vidmode); height = (int) CGDisplayModeGetHeight(vidmode); +#endif refreshRate = (int) (CGDisplayModeGetRefreshRate(vidmode) + 0.5); if (CFStringCompare(fmt, CFSTR(IO32BitDirectPixels),