SDL 2.03 on Surface 3 screen |
SDL 2.03 on Surface 3 screen |
eric.w
|
Hi Armando,
You're probably seeing the effect of DPI virtualization. I would declare your application per-monitor DPI aware; once you do that, your app's window sizes will be in physical pixels, so if you ask SDL for a 640x480 window, you'll get one that's 640x480 actual pixels. To do this you can either call a SetProcessDpiAwareness function, or add something to your application manifest xml file. See: https://msdn.microsoft.com/en-us/library/windows/desktop/dn302122(v=vs.85).aspx (there are some documentation errors which are corrected in the comments.) MS has a long article on DPI virtualization as well, here: https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx I'd like to see SDL handle this in the future - I found not declaring your app DPI aware can break SDL fullscreen mode (see https://bugzilla.libsdl.org/show_bug.cgi?id=2713 ) - but I haven't gotten around to contributing a patch for it. Cheers Eric On Sun, Feb 22, 2015 at 6:58 PM, alabouza wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
alabouza
|
Hi, Eric,
Thanks ! I will try your solution, first thing in the morning and let you know. Regards, Armando |
|||||||||||
|
alabouza
|
Hi, Eric.
The DPI aware implementation via manifest file works well for me. I prefered manifest to avoid checking Windows version, because API for DPIaware is not available in older versions of the OS. For the convenience of other developers, the manifest additional file was: <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:application> </assembly> Thank you very much, Armando |
|||||||||||
|