masterplan icon indicating copy to clipboard operation
masterplan copied to clipboard

DPI scaling.

Open ske2004 opened this issue 1 year ago • 5 comments

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

ske2004 avatar Feb 01 '24 16:02 ske2004

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

https://github.com/SolarLune/masterplan/pull/97

johntringham avatar Mar 05 '24 16:03 johntringham

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.

ske2004 avatar Mar 05 '24 19:03 ske2004

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.

johntringham avatar Mar 06 '24 11:03 johntringham