Ryan Maloney
Ryan Maloney

Reputation: 1046

How to change retina display system preferences in OSX?

I am wondering if there is a way to programmatically change the current display mode that is set in System Preferences? Specifically, I want to be able to detect and switch between the 5 Retina display modes on the new Retina MacBook Pro.

I looked through the NSUserDefaults NSGlobalDomain to try to find how to change the current display mode in System Preferences, and couldn't find anything relating to the display at all.

Thanks.

Upvotes: 8

Views: 1372

Answers (1)

Gareth Jenkins
Gareth Jenkins

Reputation: 2616

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/

Upvotes: 5

Related Questions