I want to set custom screen resolution programmatically. I checked many references and found something useful.
change screen resolution with objective-c
Get valid fullscreen resolutions on OS X in Objective-C or C++
But it is for setting screen resolutions what supported by system.
My Display can support 1920*1080 as default. But by using some apps, I can set 2560*1600 (custom resolution) and set the other custom screen resolutions too.
Is there any way to set custom resolution with Objective C or c++?
For creating custom resolution, needs to create a file in
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-(DisplayVendorID value)/DisplayProductID-(DisplayProductID value)
Here is the way for it
After creating custom resolutions, you can set it from System References and set it programmatically too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.