When programmatically working with display modes in OS X (documentation), I\'ve found that the CGDisplayCopyAllDisplayModes
leaves out the rightmost option that is
There's public API that's only documented in the header. CGDisplayCopyAllDisplayModes()
takes an options
parameter, which is a dictionary. The docs (and even the headers) say that it's unused and you must pass NULL
, but you can pass a dictionary with the key kCGDisplayShowDuplicateLowResolutionModes
and value kCFBooleanTrue
.
The option name is not really clear. It includes a bunch of extra modes.
Also, you may need to use CGDisplayModeGetPixelWidth()
and CGDisplayModeGetPixelHeight()
to distinguish between the point size and the pixel size of the backing store. (CGDisplayModeGetWidth()
and CGDisplayModeGetHeight()
return point size. By comparing those values, you can determine if the mode is scaled.)