You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0 Reported for operating system, platform: iOS (All), iPhone/iPod touch
Comments on the original bug report:
On 2011-02-17 07:43:51 +0000, Kees Bakker wrote:
The Apple doc says: "All iOS applications launch in portrait mode initially...".
So, the expectation is that the main screen dimension should be: width 768, height 1024.
However, it is reversed (as if the screen is in landscape).
For some reason this returns the correct numbers.
[uiscreen bounds]
But, depending on the value of SDL_UIKit_supports_multiple_displays, we do the following and then the numbers are in the reversed order.
[[uiscreen currentMode] size]
Also notice that the developer doc says that bounds gives numbers in "points", and "size" gives the numbers in "pixels". Wow Apple, that is helpful.
Please also notice that calling SDL_CreateWindow with width 1024 and height 768 (i.e. landscape mode) will return an SDL_Window object where width and height are magically reversed to match the portrait mode.
On 2011-02-17 07:46:15 +0000, Kees Bakker wrote:
There is a workaround and that it to leave SDL_UIKit_supports_multiple_displays set to "NO".
In that case the code will pick the [uiscreen bounds] version.
// If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels.
// The iPad added both a larger main screen and the ability to use
On 2011-03-25 13:18:05 +0000, Sam Lantinga wrote:
Ryan volunteered to look at this bug.
On 2011-03-26 22:31:46 +0000, Ryan C. Gordon wrote:
(In reply to comment # 0)
The Apple doc says: "All iOS applications launch in portrait mode
initially...".
This isn't actually true; I think that's a default, but you can specify the initial orientation in your app's Info.plist.
So, the expectation is that the main screen dimension should be: width 768,
height 1024.
I'm patching this to report both heights as available screen sizes, and orienting the screen based on what the user requests (and listening for orientation events and reporting a window resize event, if the app requested the window be "resizable").
Also notice that the developer doc says that bounds gives numbers in "points",
and "size" gives the numbers in "pixels". Wow Apple, that is helpful.
I'm pretty sure they specified that, for the pre-3.2 devices, "points" always equals pixels. For iOS devices updated to 3.2 or later, they use the "size" codepath which reports pixels...so it all works out in this case.
Please also notice that calling SDL_CreateWindow with width 1024 and height 768
(i.e. landscape mode) will return an SDL_Window object where width and height
are magically reversed to match the portrait mode.
This is being fixed; it'll force the orientation to match your window request, so if you want 1024x768, it'll render in landscape.
--ryan.
On 2011-10-10 11:30:10 +0000, Kees Bakker wrote:
I have a better fix for this problem (as mentioned on the SDL mailing list). My fix is available at bitbucket. See https://bitbucket.org/keestux/sdl
On 2013-05-21 02:21:56 +0000, Sam Lantinga wrote:
Both modes are listed, but SDL sorts landscape modes first. If you look at the current mode it will correctly show 768x1024 based on the device orientation.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0
Reported for operating system, platform: iOS (All), iPhone/iPod touch
Comments on the original bug report:
On 2011-02-17 07:43:51 +0000, Kees Bakker wrote:
On 2011-02-17 07:46:15 +0000, Kees Bakker wrote:
On 2011-03-25 13:18:05 +0000, Sam Lantinga wrote:
On 2011-03-26 22:31:46 +0000, Ryan C. Gordon wrote:
On 2011-10-10 11:30:10 +0000, Kees Bakker wrote:
On 2013-05-21 02:21:56 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: