CGDisplayCopyAllDisplayModes提供的显示模式数量比系统首选项窗格中显示的数量更多。.我只希望那些显示在系统首选项->显示下的显示模式。我如何仅获得那些显示模式?
Checking each mode with CGDisplayModeIsUsableForDesktopGUI()
will allow you to filter out modes which are too low-resolution, or have too shallow of a color depth, to be used as the "desktop" resolution. That should eliminate most of the truly wacky modes.
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.