How to Programmatically Change The Xdr Display Reference Mode (Aka Preset) on Macos

How to change retina display system preferences in OSX?

Check out http://www.reddit.com/r/apple/comments/vi9yf/set_your_retina_macbook_pros_resolution_to/ -- uses the private API CGSGetDisplayModeDescriptionOfLength and CGSConfigureDisplayMode to set. Code's included in the kindly distributed .app bundle.

I just wrote up a lengthy post about my endeavours in trying to answer the same question - see
http://garethjenkins.com/2012/07/01/investigating-a-high-resolution-retina-utility-for-macbook-pro-1x-and-2x-modes/

Mac OS X: Best way to do runtime check for retina display?

If you really do need to do this, take a look at -[NSScreen backingScaleFactor]. But, this does seem wrong-headed, at least without knowing more about why you want to know.

While there is currently only one Mac with a Retina display, there may eventually be standalone displays that support Retina (and can be attached/detached at runtime) and you may be able to configure the built-in Retina display in 1x mode. Thus the answer to the question "is there a Retina display attached" can change at any time.

Rather, you may want to know if your content should be drawn with a given scale by using the -convert*ToBacking: methods or -[NSWindow backingScaleFactor]. For a ton more detail, watch the WWDC 2012 session video "Advanced Tips and Tricks for High Resolution on OS X" (when posted, hopefully within the next few weeks).



Related Topics



Leave a reply



Submit