We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2328 - HiDPI support on Windows is broken
Summary: HiDPI support on Windows is broken
Status: RESOLVED DUPLICATE of bug 2713
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-24 17:22 UTC by BurnSpamAddress
Modified: 2015-02-24 04:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BurnSpamAddress 2013-12-24 17:22:56 UTC
HiDPI support on Windows does not follow the DPI scaling guidelines from MSDN [1]

To reproduce:
 - set DPI scaling on Windows to 200%. (Any value over 125% will reproduce the issue).
 - create a 800x600 window without SDL_ALLOW_HIGHDPI. Windows will scale (pixel-double) the SDL window to the correct logical size.
 - create a 800x600 window with SDL_ALLOW_HIGHDPI. The window will now appear shrunk down by 50%.

According to MSDN, a correct DPI-aware application must appear at the same logical size regardless of the DPI setting. In this specific case, if the user requests a window with a size of 800x600 points at 200% scaling, he/she should get a 1600x1200 pixel window with the correct logical size.

SDL already does this on Mac OS X: the same steps above will create a window with identical logical size but different resolutions.

[1] http://msdn.microsoft.com/en-us/library/ms701681%28v=vs.85%29.aspx
Comment 1 BurnSpamAddress 2013-12-24 17:23:31 UTC
This is reproducible with Hg r8072.
Comment 2 Sam Lantinga 2013-12-24 20:21:33 UTC
It's just not implemented at the moment. You're welcome to contribute a patch if you want it urgently.

Cheers,
Comment 3 BurnSpamAddress 2013-12-25 21:42:11 UTC
Will do, I've already implemented this in the native backend for OpenTK (C#), so spinning a patch for SDL should be easy enough.
Comment 4 Sam Lantinga 2013-12-26 05:50:24 UTC
Great, thanks! :)
Comment 5 Ryan C. Gordon 2015-02-24 04:49:05 UTC
Marking this as a dupe of Bug #2713.

--ryan.

*** This bug has been marked as a duplicate of bug 2713 ***