The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL apps, Retina displays, and DPI settings
Keith Holman
Guest

When running in "fullscreen windowed" mode on Windows machines where the DPI has been set above 100%, the window ends up being 150% or so as wide as the screen. This makes the game unplayable.
Does anyone have any experience dealing with SDL games on Retina displays or on Windows machines with high DPI settings? I would like the game to be able to reliably create a window of the correct size regardless of the user's DPI settings.


(There is a workaround involving the executable's compatibility settings, but that requires manual effort by the user.)



Thanks,
Keith Holman
Zachtronics
SDL apps, Retina displays, and DPI settings
Alexander Szpakowski
Guest

There's an issue for retina support on the SDL bugzilla, but the discussion there is mostly about implementing it for OS X: http://bugzilla.libsdl.org/show_bug.cgi?id=1934

On 2013-07-18, at 3:18 PM, Keith Holman wrote:
Quote:
When running in "fullscreen windowed" mode on Windows machines where the DPI has been set above 100%, the window ends up being 150% or so as wide as the screen. This makes the game unplayable.
Does anyone have any experience dealing with SDL games on Retina displays or on Windows machines with high DPI settings? I would like the game to be able to reliably create a window of the correct size regardless of the user's DPI settings.


(There is a workaround involving the executable's compatibility settings, but that requires manual effort by the user.)



Thanks,
Keith Holman
Zachtronics




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL apps, Retina displays, and DPI settings
Sik


Joined: 26 Nov 2011
Posts: 905
That seems to be mostly about OSX, yeah, but the issue is similar on
Windows (basically you have to call a function to tell Windows the
program is DPI-aware, then Windows will stop scaling up pixels as if
they were units).

2013/7/18, Alexander Szpakowski:
Quote:
There's an issue for retina support on the SDL bugzilla, but the discussion
there is mostly about implementing it for OS X:
http://bugzilla.libsdl.org/show_bug.cgi?id=1934

On 2013-07-18, at 3:18 PM, Keith Holman wrote:

Quote:
When running in "fullscreen windowed" mode on Windows machines where the
DPI has been set above 100%, the window ends up being 150% or so as wide
as the screen. This makes the game unplayable.

Does anyone have any experience dealing with SDL games on Retina displays
or on Windows machines with high DPI settings? I would like the game to be
able to reliably create a window of the correct size regardless of the
user's DPI settings.

(There is a workaround involving the executable's compatibility settings,
but that requires manual effort by the user.)

Thanks,
Keith Holman
Zachtronics

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL apps, Retina displays, and DPI settings
Vittorio Giovara
Guest

On Thu, Jul 18, 2013 at 8:24 PM, Alexander Szpakowski wrote:
Quote:
There's an issue for retina support on the SDL bugzilla, but the discussion there is mostly about implementing it for OS X: http://bugzilla.libsdl.org/show_bug.cgi?id=1934




With more and more HDDPI technology foreseeable in the future, I took the liberty of tagging this bug for 2.0.
Vittorio
SDL apps, Retina displays, and DPI settings
Keith Holman
Guest

In case anyone else has the same problem, here is the solution to undesired DPI scaling on Windows: You mark your program as "dpiAware" in its app manifest.

In C# apps: [url=http://msdn.microsoft.com/en-us/library/windows/desktop/ms633543(v=vs.85).aspx]http://msdn.microsoft.com/en-us/library/windows/desktop/ms633543(v=vs.85).aspx[/url]
In native apps: [url=http://msdn.microsoft.com/en-us/library/windows/desktop/dd464659(v=vs.85).aspx#step3]http://msdn.microsoft.com/en-us/library/windows/desktop/dd464659(v=vs.85).aspx#step3[/url]



There is also a SetProcessDPIAware() function, but MSDN recommends using the app manifest instead.
SDL apps, Retina displays, and DPI settings
Sik


Joined: 26 Nov 2011
Posts: 905
2013/7/19, Keith Holman:
Quote:
There is also a SetProcessDPIAware() function, but MSDN recommends using
the app manifest instead.

Using SetProcessDPIAware is probably still the better idea though
because SDL wants to rely on the program settings as little as
possible. Also on MinGW it's much easier to end up missing the
manifest.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org