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

MACOSX: simplify Retina blurriness workarounds and restore Dark Mode #2714

Open

Conversation

@dwatteau
Copy link
Contributor

@dwatteau dwatteau commented Jan 3, 2021

This is related to bugs #11430 and #11305.

It appears that commit a1d9302 is actually enough to avoid blurriness display issues on Retina screens (i.e. favour OpenGL rendering over Metal rendering inside SDL2, because of interaction problems between macOS on Retina screens and SDL2).

Previous attempts at working around this included disabling Dark Mode (c59bf95) and passing a particular "invalid" argument to the -platform_version linker flag (70f79d3), but it appears that SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl") is sufficient to avoid this bug (until a future version of SDL2 possibly fixes this for good and makes any workaround unnecessary).

(Note when manually testing changes to Info.plist: temporary rename your .app before launching it again, otherwise macOS may cache some previous values ― that's probably why I thought the other commits were still necessary when submitting my SDL_HINT_RENDER_DRIVER PR.)

This works for me with a local Xcode 12.2 build on macOS 11.1, with a quick test of the old builtin theme, which isn't blurry. (I can also test this on my other Retina machine with Mojave if you like, but only in a few weeks.) However, I use newer SDKs than what's used for official builds, so maybe the best way to validate this PR would be to provide an official test build containing it?

And if this PR is accepted, a backport to the 2.2 branch might be wanted.

dwatteau added 2 commits Jan 3, 2021
… displays

Commit a1d9302 is actually enough to
stop the blurry display issue on Retina screens (Bug #11430).

This reverts most of 70f79d3.
…, for now"

Since commit a1d9302 seems to be a
reliable way of avoiding any blurry display issue on Retina screens,
macOS Dark Mode can be enabled again.

This reverts commit c59bf95, and thus
restores commit 485e8be.

This fixes back bug #11305: Dark Mode is not supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.