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 1380

Summary: SDL_GetWindowSize() returns wrong size on iPhone retina and iPad
Product: SDL Reporter: Vern Jensen <vern>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P1 Keywords: target-2.0.0
Version: HG 2.0   
Hardware: x86   
OS: iOS 4   

Description Vern Jensen 2012-01-19 12:14:25 UTC
On iPhone retina display, SDL_GetDisplayMode() correctly returns 960x640 and 640x960. However, SDL_GetWindowSize() returns 480x320 or 320x480.

This inconsistent behavior is something I currently have to work around in my ported game that uses SDL_GetWindowSize() to determine if it needs to scale the image larger to fit the display. It currently scales it improperly due to getting the wrong size.

Window resize events from SDL also contain the wrong (too small) resolution size.
Comment 1 Sam Lantinga 2012-01-19 17:58:22 UTC
Hey Ryan, can you look at this when you dig into the retina display support?
Comment 2 Ryan C. Gordon 2013-07-12 18:52:31 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 1.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 3 Ryan C. Gordon 2013-07-30 02:09:08 UTC
The sad thing is that this was probably fixed six days after this report was opened, in this commit:

    http://hg.libsdl.org/SDL/rev/ed2cf4669e55

I'm resolving this as FIXED, as a lot of work went into Retina support since this bug, and no one's noted it to be a problem recently.

--ryan.