Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HiDPI support on Windows is broken #1294

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

HiDPI support on Windows is broken #1294

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
duplicate This issue or pull request already exists

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.1
Reported for operating system, platform: Windows 7, x86_64

Comments on the original bug report:

On 2013-12-24 17:22:56 +0000, wrote:

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

On 2013-12-24 17:23:31 +0000, wrote:

This is reproducible with Hg r8072.

On 2013-12-24 20:21:33 +0000, Sam Lantinga wrote:

It's just not implemented at the moment. You're welcome to contribute a patch if you want it urgently.

Cheers,

On 2013-12-25 21:42:11 +0000, wrote:

Will do, I've already implemented this in the native backend for OpenTK (C#), so spinning a patch for SDL should be easy enough.

On 2013-12-26 05:50:24 +0000, Sam Lantinga wrote:

Great, thanks! :)

On 2015-02-24 04:49:05 +0000, Ryan C. Gordon wrote:

Marking this as a dupe of Bug # 2713.

--ryan.

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

@SDLBugzilla SDLBugzilla added bug duplicate This issue or pull request already exists labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant