lordmauve / wasabi2d

Cutting-edge 2D game framework for Python
https://wasabi2d.readthedocs.io/
GNU Lesser General Public License v3.0
154 stars 24 forks source link

Support Windows DPI awareness #53

Open lordmauve opened 4 years ago

lordmauve commented 4 years ago

Windows can be told that a process is DPI aware using this code:

try:
    ctypes.windll.shcore.SetProcessDpiAwareness(True)
except Exception:
    pass

Without this Windows will automatically enlarge the window on a high-dpi display, giving a fuzzier quality than either directly rendering at higher resolution or using our scaler system.

We should work out the best way to support this for apps that genuinely want to render at high-dpi if available.

rdb commented 3 years ago

Speaking as a user of a high-DPI display, please don't set this without also adding some way to automatically upscale window size and UI elements in applications.