Device orientation quirks on Android |
ggambetta
|
I'm back after a looong time (remember http://www.mysterystudio.com? Yeah, didn't think so). It's amazing to see how much things have improved in the last few years SDL2 is fantastic. I ported my game framework to SDL2 and made it run without problems on Linux, OSX and iOS.
Now Android, pretty much working, except screen orientation. I have this game with "screens", some are portrait, some are landscape. The user isn't supposed to control this, but to physically rotate the device when the game shows a landscape screen. I managed to force the orientation on iOS using SDL_HINT_ORIENTATIONS and calling SDL_CreateWindow() again. However, the same code doesn't work on Android: - If I set android:configChanges="orientation" and I rotate the device, it freezes (and practically freezes the phone), and my forced orientation changes (Hint + SDL_CreateWindow()) do nothing. - If I set it to "orientation|screenSize" my forced changes still don't work, and when I physically rotate the device, I get a smooth screen rotation (and the phone doesn't freeze). This is also not what I want. So... what would be the correct way to have this behavior? I'd be surprised if it hadn't been done before. FWIW, I'm not using OpenGL, just SDL calls. Thanks, --Gabriel |
|||||||||||
|
Device orientation quirks on Android |
Sam Lantinga
|
Yes, please send patches!
On Tue, Oct 7, 2014 at 5:52 AM, ggambetta wrote:
|
|||||||||||||
|
Device orientation quirks on Android |
Jeffrey Carpenter
Guest
|
Heya,
I would especially like to see a patch for the "garbage in the letterboxing" issue. This issue effects other platforms, too, i.e.: OS X. Cheers, Jeffrey Carpenter On 2014/10/ 07, at 7:52, ggambetta wrote:
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|