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 2716 - OS X w/ Retina: SDL_GL_GetDrawableSize differs from SDL_GetWindowSize even though SDL_WINDOW_ALLOW_HIGHDPI not used
Summary: OS X w/ Retina: SDL_GL_GetDrawableSize differs from SDL_GetWindowSize even th...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Other
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-04 02:23 UTC by Eric Wasylishen
Modified: 2017-08-02 18:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Wasylishen 2014-09-04 02:23:12 UTC
This may just be a documentation bug, but it was very confusing to me.

(on 15" macbook pro retina (2880x1800), OS X 10.9.4, resolution set to "best for display" mode in system preferences, not scaled.):

- launch testgl2 (included with sdl2) with "--fullscreen" and "--geometry 800x600"
- exit
- look in the xcode console, I get:

2014-09-03 20:12:01.503 testgl2[4085:303] INFO: Window Size   : 800,600
2014-09-03 20:12:01.503 testgl2[4085:303] INFO: Draw Size     : 840,525

This is surprising because the docs only say that SDL_GL_GetDrawableSize can differ from SDL_GetWindowSize if SDL_WINDOW_ALLOW_HIGHDPI is used. Perhaps the docs here: https://wiki.libsdl.org/SDL_GL_GetDrawableSize should say:
"This may differ from SDL_GetWindowSize() on a high-dpi display whether or not you request a high-dpi window using SDL_WINDOW_ALLOW_HIGHDPI.."

Tested on sdl2 hg cd6696d55781 (Sept 2, 2014)
Comment 1 Eric Wasylishen 2017-07-22 05:16:52 UTC
No longer reproducible on macOS 10.12.5, (neither current HG nor Sept 2, 2014's version)
Comment 2 Sam Lantinga 2017-08-02 18:40:24 UTC
Maybe fixed by the OS?