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 1381 - SDL_GetDisplayBounds() does not take into account iOS device orientation
Summary: SDL_GetDisplayBounds() does not take into account iOS device orientation
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 iOS 4
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 14:05 UTC by Vern Jensen
Modified: 2012-01-19 19:30 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 Vern Jensen 2012-01-19 14:05:58 UTC
SDL_GetDisplayBounds() returns the same results regardless of what "orientation" the iOS device is currently in. For iPad, it returns 768x1024 regardless of whether the device is currently in portrait or landscape.

Not sure if you agree with this, but it'd seem to make sense for it to return the dimensions appropriate for the current orientation. For now, I'm going to work around this in my code to get my program to handle orientation changes correctly.
Comment 1 Sam Lantinga 2012-01-19 17:58:53 UTC
Hey Ryan, can you look at this when you dig into the retina display support?
Comment 2 Vern Jensen 2012-01-19 19:30:58 UTC
Addtionally, it does not return the proper size on a Retina display. (It still returns 480x320, instead of 960x640.)

(Again, by contrast, SDL_GetDisplayMode DOES return the proper size for retina display. So my workaround will be calling *this* and returning the appropriate value depending on current orientation.)