Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 683
Ryan Maloney Avatar asked Jun 24 '12 21:06

Ryan Maloney


1 Answers

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/

like image 104
Gareth Jenkins Avatar answered Nov 11 '22 18:11

Gareth Jenkins