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

DPI scaling. #96

Open
skejeton opened this issue Feb 1, 2024 · 3 comments
Open

DPI scaling. #96

skejeton opened this issue Feb 1, 2024 · 3 comments

Comments

@skejeton
Copy link
Contributor

skejeton commented Feb 1, 2024

Currently (at least on Windows) if you have a High-DPI display, everything will appear blurry because the DPI scaling isn't handled properly.

@johntringham
Copy link

I've just made a PR that fixes the blurry text issue - it's not directly High-DPI related but could help your situation

#97

@skejeton
Copy link
Contributor Author

skejeton commented Mar 5, 2024

Thank you! It's a step further. The main thing I need for myself is just to enable DPI awareness switch in the code (WinAPI call SetProcessDpiAwareness, similar things for other platforms). Since this is using SDL I think there's a cross platform function for that.

But I'm on Windows and this program uses go-sdl, and I spent a lot of time trying to build it but in the end it took me a lot of time, and I gave up after I needed to compile SDL_gfx for mingw myself, since it's a 3rd party library.

@johntringham
Copy link

Ah ok I understand. Not sure if you've tried this, but if its not easy to change in code, there's a possible workaround by bypassing some of Windows' high DPI scaling stuff via the .exe's properties window, which has resolved some DPI issues for me in the past:

image

Its not perfect, because the app still won't be "aware" of the current DPI and so will render at the same pixel-based size when you switch from a low-DPI monitor to a high-DPI one, but at least it should stop Windows making the app appear blurry.

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

2 participants