Maybe I’m getting this wrong but I am expecting to see 768x1024
when I initially do SDL_GetDisplayMode() on my iPad.
The simulator correctly gives 768x1024, but on the iPad I see
1024x768.
The Apple doc says: “All iOS applications launch in portrait mode
initially…”.
BTW. At the moment my program totally ignores all iOS gravity
events, or whatever it is called. The program believes it is just
on a regular desktop environment.
Maybe I’m getting this wrong but I am expecting to see 768x1024
when I initially do SDL_GetDisplayMode() on my iPad.
The simulator correctly gives 768x1024, but on the iPad I see
1024x768.
The Apple doc says: “All iOS applications launch in portrait mode
initially…”.
Debugging a little further using the test program in the Xcode template…
This is what I see.
SDL_DisplayMode mode;
SDL_GetDisplayMode(0, 0, &mode);
int width = mode.w;
int height = mode.h;
printf("width/height = %dx%d\n", width, height);
This prints:
width/height = 1024x768
Then stepping into SDL_CreateWindow with my width and height.
It does this:
window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
window->magic = &_this->window_magic;
window->id = _this->next_object_id++;
window->x = x;
window->y = y;
window->w = w;
window->h = h;
But then in UIKit_CreateWindow and further down in SetupWindowData
it does this:
/* Fill in the SDL window with the window data */
{
window->x = 0;
window->y = 0;
window->w = (int)uiwindow.frame.size.width;
window->h = (int)uiwindow.frame.size.height;
}
After that width/height is now 768 x 1024.
With the new setting I don’t have a problem. It’s the SDL_GetDisplayMode
that I don’t like. Wouldn’t you agree?
Maybe I’m getting this wrong but I am expecting to see 768x1024
when I initially do SDL_GetDisplayMode() on my iPad.
The simulator correctly gives 768x1024, but on the iPad I see
1024x768.
The Apple doc says: “All iOS applications launch in portrait mode
initially…”.
Debugging a little further using the test program in the Xcode template…
It is only now that I see this in SDL_uikitvideo.m. I’m still studying
what it means
/*
!!! FIXME:
The main screen should list a AxB mode for portrait orientation, and then
also list BxA for landscape mode. When setting a given resolution, we should
rotate the view’s transform appropriately (extra credit if you check the
accelerometer and rotate the display so it’s never upside down).
Maybe I’m getting this wrong but I am expecting to see 768x1024
when I initially do SDL_GetDisplayMode() on my iPad.
The simulator correctly gives 768x1024, but on the iPad I see
1024x768.
The Apple doc says: “All iOS applications launch in portrait mode
initially…”.
Debugging a little further using the test program in the Xcode template…
It is only now that I see this in SDL_uikitvideo.m. I’m still studying
what it means
/*
!!! FIXME:
The main screen should list a AxB mode for portrait orientation, and then
also list BxA for landscape mode. When setting a given resolution, we should
rotate the view’s transform appropriately (extra credit if you check the
accelerometer and rotate the display so it’s never upside down).
Thanks!On Wed, Feb 16, 2011 at 3:02 PM, Kees Bakker <kees.bakker at xs4all.nl> wrote:
On 16 Feb, 2011, at 22:09 , Kees Bakker wrote:
On 16 Feb, 2011, at 21:48 , Kees Bakker wrote:
On 15 Feb, 2011, at 22:25 , Kees Bakker wrote:
Hi,
Maybe I’m getting this wrong but I am expecting to see 768x1024
when I initially do SDL_GetDisplayMode() on my iPad.
The simulator correctly gives 768x1024, but on the iPad I see
1024x768.
The Apple doc says: “All iOS applications launch in portrait mode
initially…”.
Debugging a little further using the test program in the Xcode
template…
It is only now that I see this in SDL_uikitvideo.m. I’m still studying
what it means
/*
!!! FIXME:
The main screen should list a AxB mode for portrait orientation, and then
also list BxA for landscape mode. When setting a given resolution, we
should
rotate the view’s transform appropriately (extra credit if you check the
accelerometer and rotate the display so it’s never upside down).