SDL2 Testing (plus iOS bug)

The key problem was (I suspect) another compatibility layer problem. It seems some scancodes & keycodes were swapped around when using 1.3. Regardless, once I got them in order, everything seems to be working fine in OS X.

Now I moved on the the iOS project, and I’m seeing one piece of really bizarre behavior. I know people have gone over this left and right. It’s a change from 1.3 and creates kind of a strange mismatch. My game runs in landscape, and is locked to that. Everywhere in the game I need to flip the width/height. SDL reports the width/height as if the iPad is never in landscape. This is fine, I flip everything, and rotate my OpenGL view.

BUT … in SDL2, SDL_CreateWindow takes the flip into effect, so when I make that call, I have to put in width/height NOT reversed.

This creates a weird problem where some of my code needs a flip, while others doesn’t.

Basically, any “what’s the desktop” function returns the width/height as if the iPad is NEVER in landscape. This is probably the way it should be as it’s up to the programmer to deal with this – for instance, you ALWAYS have to setup your OpenGL matrix to handle this. To you, it’s still a non-landscape window that your rotate. SDL_CreateWindow does the opposite, it takes the flip into effect.

[>] Brian