Devilutionx: In-game scaling is not DPI-aware

Created on 1 Sep 2020  路  2Comments  路  Source: diasurgical/devilutionX

I found out about this while working on #784.

Turns out that SDL is currently adjusting the screen bounds based on the external Windows DPI scaling setting. Since I actually use 125% scaling on my machine (yeah... I'm kinda blind, don't mock me), the in-game scaling was completely off when going fullscreen. Instead of considering the full 1080p resolution of my monitor, SDL was adjusting it to 1536x864, effectively causing a second scaling to happen from that resolution up to 1920.

image

image

Here is how the game looks when all this happens (absolutely terrible):

image

It looks like we have to make DevilutionX DPI-aware to solve this problem. I have not looked at it yet but here is a useful article:
https://nlguillemot.wordpress.com/2016/12/11/high-dpi-rendering/

bug

All 2 comments

I use 125% too

Just found a way to "fix" this which is seemingly very simple:

image

Setting this scaling overide fixes the integer/"fake resolution" scaling issue.

I'll see how I can integrate this in the source directly to avoid having to set this flag in the exe.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AJenbo picture AJenbo  路  4Comments

sharp299 picture sharp299  路  5Comments

namtsui picture namtsui  路  3Comments

Chance4us picture Chance4us  路  3Comments

matthewrkarlsen picture matthewrkarlsen  路  3Comments