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

Summary: OS X w/ Retina: SDL_GL_GetDrawableSize differs from SDL_GetWindowSize even though SDL_WINDOW_ALLOW_HIGHDPI not used
Product: SDL Reporter: Eric Wasylishen <ewasylishen>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Other   

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?