openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.84k stars 2.56k forks source link

Fix high-DPI support on macOS by setting NSHighResolutionCapable to true #7956

Closed halinfinite closed 1 month ago

halinfinite commented 1 month ago

Description

This pull request addresses the issue of high-DPI support on macOS for openFrameworks applications. By default, the NSHighResolutionCapable key is not set to true in the Info.plist file, causing applications to appear blurry on Retina displays.

Changes Made

Testing

This fix ensures that all new projects will support high-DPI displays on macOS by default, improving the user experience.

dimitre commented 1 month ago

I don't think OFCore is yet ready to use displays in high res. things will appear scaled down. it would be great if plist booleans could be set in xcconfig file format like this

INFOPLIST_KEY_NSHighResolutionCapable = NO

but apple didn't help with setting booleans there. or variables in XCode plist.

ofTheo commented 1 month ago

Yeah, agree. @dimitre

@halinfinite - check out the discussion in the issue here: #4789

There is a lot to do to get graphics working correctly in Retina mode ( and to handle moving windows from Retina to non-Retina screens and readjusting ).

Unfortunately it is not as simple as just adding the bool to the plist.

dimitre commented 1 month ago

Hello @halinfinite using the latest master now you can enable retina for your project by creating an App.xcconfig in your project folder with the content

HIGH_RESOLUTION_CAPABLE = YES

this setting will be kept even when regenerating project

halinfinite commented 1 month ago

That's amazing news @dimitre I am glad this is solved. Thanks for the support and all the improvements to openFrameworks