{"id":284,"date":"2017-02-05T04:06:15","date_gmt":"2017-02-05T09:06:15","guid":{"rendered":"http:\/\/eastfist.com\/qt_tutorials\/?p=284"},"modified":"2017-08-26T03:25:40","modified_gmt":"2017-08-26T09:25:40","slug":"fixing-windows-10-aspect-ratio-scaling-problem-for-lower-resolution-display","status":"publish","type":"post","link":"https:\/\/eastfist.com\/qt_tutorials\/fixing-windows-10-aspect-ratio-scaling-problem-for-lower-resolution-display\/","title":{"rendered":"Fixing Windows 10 Aspect Ratio Scaling Problem For Lower Resolution Display"},"content":{"rendered":"<p>You may notice if you&#8217;re still deploying applications using resolutions less than 800x600x72dpi on Windows 10 that the autoscaling for the aspect ratio might be wonky. That&#8217;s because all these new fancy operating systems are trying to cater to ultra high resolution\/density screens these days, and if you&#8217;re building an old-fashion 2D game engine that doesn&#8217;t require too much screen resolution, the final output might be thrown off a bit. Sometimes it&#8217;s just the graphics card, but in Windows 10 case, it seems it&#8217;s built into the operating system. Anyway, this is how I &#8220;fixed&#8221; it.<\/p>\n<figure id=\"attachment_285\" aria-describedby=\"caption-attachment-285\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2017\/02\/windows10aspectRatioIncorrect.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-285\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2017\/02\/windows10aspectRatioIncorrect-300x169.png\" alt=\"Example of incorrect aspect ratio in Windows 10 auto-scaling fullscreen\" width=\"300\" height=\"169\" \/><\/a><figcaption id=\"caption-attachment-285\" class=\"wp-caption-text\">Example of incorrect aspect ratio in Windows 10 auto-scaling fullscreen<\/figcaption><\/figure>\n<p><!--more--><\/p>\n<p>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&#8217;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&#215;480.<\/p>\n<figure id=\"attachment_286\" aria-describedby=\"caption-attachment-286\" style=\"width: 209px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2017\/02\/windows10highDPIscalingMode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-286\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2017\/02\/windows10highDPIscalingMode-209x300.png\" alt=\"To fix Windows 10 automatic aspect ratio scaling for lower resolutions, in this case 640x480x72dpi, you'll need to enable compatibility mode settings\" width=\"209\" height=\"300\" \/><\/a><figcaption id=\"caption-attachment-286\" class=\"wp-caption-text\">To fix Windows 10 automatic aspect ratio scaling for lower resolutions, in this case 640x480x72dpi, you&#8217;ll need to enable compatibility mode settings<\/figcaption><\/figure>\n<p>You can deduce by the way it automatically scaled that it&#8217;s still proportional, and if you&#8217;re aware, new computer displays have higher density resolutions of more than 72dpi these days. So to fix the incorrect scaling aspect ratio, you&#8217;ll have to right click on the application icon and go to &#8220;Compatibility&#8221; tab and check the &#8220;Disable display scaling on high DPI settings&#8221; in the &#8220;Settings&#8221; group. You don&#8217;t have to check &#8220;Run in 640&#215;480 screen resolution&#8221; or touch any other setting.<\/p>\n<figure id=\"attachment_287\" aria-describedby=\"caption-attachment-287\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2017\/02\/windows10aspectRatioCorrected.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-287\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2017\/02\/windows10aspectRatioCorrected-300x169.png\" alt=\"Voila! After disabling high resolution dpi scaling, Windows 10 displays legacy resolutions correctly\" width=\"300\" height=\"169\" \/><\/a><figcaption id=\"caption-attachment-287\" class=\"wp-caption-text\">Voila! After disabling high resolution dpi scaling, Windows 10 displays legacy resolutions correctly<\/figcaption><\/figure>\n<p>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&#8217;m sure there is a way to preset this, but I&#8217;ll have to look into it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may notice if you&#8217;re still deploying applications using resolutions less than 800x600x72dpi on Windows 10 that the autoscaling for the aspect ratio might be wonky. That&#8217;s because all these new fancy operating systems are trying to cater to ultra high resolution\/density screens these days, and if you&#8217;re building an old-fashion 2D game engine that &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/eastfist.com\/qt_tutorials\/fixing-windows-10-aspect-ratio-scaling-problem-for-lower-resolution-display\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fixing Windows 10 Aspect Ratio Scaling Problem For Lower Resolution Display&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,74],"tags":[96,90,93,60,94,95,3,91,89,19,88,92],"class_list":["post-284","post","type-post","status-publish","format-standard","hentry","category-qt-2","category-sdxm-2","tag-api","tag-aspect-ratio","tag-automatic","tag-fix","tag-high-resolution","tag-nvidia","tag-qt","tag-resolution","tag-scaling","tag-tutorial","tag-windows-10","tag-windows-api"],"_links":{"self":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts\/284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/comments?post=284"}],"version-history":[{"count":8,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts\/284\/revisions"}],"predecessor-version":[{"id":321,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts\/284\/revisions\/321"}],"wp:attachment":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/media?parent=284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/categories?post=284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/tags?post=284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}