Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

halinfinite
Copy link

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

  • Updated the Info.plist template in the project generator to include the NSHighResolutionCapable key set to true.

Testing

  • Created a new project using the updated project generator.
  • Verified that the Info.plist file includes the NSHighResolutionCapable key set to true.
  • Tested the application on a Retina display to ensure it renders correctly.

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

@dimitre
Copy link
Member

dimitre commented May 15, 2024

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
Copy link
Member

ofTheo commented May 15, 2024

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
Copy link
Member

dimitre commented May 18, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants