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

SDL2 game is blurry on native Wayland #12161

Open
slouken opened this issue Feb 2, 2025 · 3 comments
Open

SDL2 game is blurry on native Wayland #12161

slouken opened this issue Feb 2, 2025 · 3 comments
Assignees
Milestone

Comments

@slouken
Copy link
Collaborator

slouken commented Feb 2, 2025

Hello, I'm not 100% sure if this is the right issue to ask, but we're having an issue where our SDL2 game looks sharp and pixel-perfect via xWayland on a Wayland session set to 125% scaling, but when running it in native Wayland mode, the game is now blurry. DPI scaling works correctly on Windows too. We're wondering if we're missing a hint or something to make sure the window is DPI aware on Linux with native Wayland. Could you point me in the right direction?

Originally posted by @Reonu in #12140

@slouken slouken added this to the 2.32.0 milestone Feb 2, 2025
@Reonu
Copy link

Reonu commented Feb 2, 2025

Hello, does you creating this issue mean this is a known issue with SDL2? Or do you need more details from me? Thanks!

@slime73
Copy link
Contributor

slime73 commented Feb 2, 2025

Does your SDL2 game use SDL_WINDOW_ALLOW_HIGHDPI?

@Reonu
Copy link

Reonu commented Feb 2, 2025

Does your SDL2 game use SDL_WINDOW_ALLOW_HIGHDPI?

We weren't using it, we were just using SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "permonitorv2") instead, which I realize now it's probably only for Windows? (Remember that it behaves correctly on Windows: the game is still sharp there)

In any case, I just tried adding the flag, and the issue still remains.

Let me know if you need me to test or check anything else.

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

No branches or pull requests

4 participants