What is the equivalent in the manifest for the Override DPI scaling "Application" on Windows 10?

  • Thread starter Thread starter Skiptic
  • Start date Start date
S

Skiptic

Guest
I have a multimonitor, full screen application that gets the screen resolution using


setSize( sf::Vector2u(
GetSystemMetrics( SM_CXVIRTUALSCREEN ),
GetSystemMetrics( SM_CYVIRTUALSCREEN ) ) );

The application should ignore the system DPI settings and return not scaled screens resolutions

When I set the "Override high DPI scaling" in the file properties under Compatibility tab to "Application" the app ignores the DPI scaling of the screen and GetSystemMetrics returns the native resolution of the screen. When I set the dpiAware/dpiAwareness in the manifest the application crashes or returns wrong( scaled ) value of the native resolution of both screens. I've tried all possible combinations in the manifest, bt none seem to work.

So the question is How can I reproduce the behaviour of "Override high DPI scaling" = "Application" in the manifest?

This is my manifest:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:application>

<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>

<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<dpiAwareness>permonitorv2</dpiAwareness>
</asmv3:windowsSettings>

</asmv3:application>
</assembly>

Continue reading...
 
Back
Top