In fact, I am having multiple problems,
when initializing the window, it completely ignores the order I Put the values on width/height of the window.
It always take the bigger value to the height, in other words, it always set to a Portrait resolution. Either in 320x480 or 640x960 (Retina)
forcing the orientation to be Landscape doesnt do the trick because it stretches the image incorrectly.
Wasnt the order I put the width/height parameters supposed to matter?
I worked around this issue setting the window to SDL_WINDOW_RESIZABLE and setting the SDL_HINT_ORIENTATIONS To Landscape.
But now it does not scale automatically to the Retina Display size.
Anyway, how can I set a Landscape resolution and still get the auto-scale to work in retina display? =/
These are the parameters:
mywindow = SDL_CreateWindow( " name here", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
480, 320, SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE );
// Doesnt matter 480, 320 or 320, 480, it will always be 320, 480 in iOS regular resolution.
SDL_SetHint(SDL_HINT_ORIENTATIONS, “LandscapeLeft LandscapeRight”);