Fixing Windows 10 Aspect Ratio Scaling Problem For Lower Resolution Display

You may notice if you’re still deploying applications using resolutions less than 800x600x72dpi on Windows 10 that the autoscaling for the aspect ratio might be wonky. That’s because all these new fancy operating systems are trying to cater to ultra high resolution/density screens these days, and if you’re building an old-fashion 2D game engine that doesn’t require too much screen resolution, the final output might be thrown off a bit. Sometimes it’s just the graphics card, but in Windows 10 case, it seems it’s built into the operating system. Anyway, this is how I “fixed” it.

Example of incorrect aspect ratio in Windows 10 auto-scaling fullscreen

Example of incorrect aspect ratio in Windows 10 auto-scaling fullscreen

Luckily, Windows 10 and my graphics card automatically changes the resolution so that legacy resolution is centered corrected for wide aspect ratio screen. However, notice the graphics don’t scale to fit the entire screen as it would on an older operating system, despite the application being programmed to fit the window for target resolution of 640×480.

To fix Windows 10 automatic aspect ratio scaling for lower resolutions, in this case 640x480x72dpi, you'll need to enable compatibility mode settings

To fix Windows 10 automatic aspect ratio scaling for lower resolutions, in this case 640x480x72dpi, you’ll need to enable compatibility mode settings

You can deduce by the way it automatically scaled that it’s still proportional, and if you’re aware, new computer displays have higher density resolutions of more than 72dpi these days. So to fix the incorrect scaling aspect ratio, you’ll have to right click on the application icon and go to “Compatibility” tab and check the “Disable display scaling on high DPI settings” in the “Settings” group. You don’t have to check “Run in 640×480 screen resolution” or touch any other setting.

Voila! After disabling high resolution dpi scaling, Windows 10 displays legacy resolutions correctly

Voila! After disabling high resolution dpi scaling, Windows 10 displays legacy resolutions correctly

And that should fix it! Now, the problem with this is the end-user might not know how to resolve this when they first load your application. So you might have to deploy your application with instructions or provide a shortcut icon with these flags preset and instruct the user to click on the icon instead of the application icon itself. I’m sure there is a way to preset this, but I’ll have to look into it.

This entry was posted in Qt, SDXM and tagged , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *