[SDL] iPhone iOS4+SDL+Multitasking cannot restore from suspend
david.ludwig at funkitron.com
Thu Dec 23 10:43:13 PST 2010
I ran into a similar problem a few months ago when porting a commercial, SDL and OpenGL ES enabled game to iOS. The app would run after being suspended and resumed, but the screen was black.
I found an odd fix for the problem. I'm not entirely sure why it worked either. It didn't involve implementing texture restoration, at least not in any direct sense. What I did was modify SDL to create its window and gl context very early in the app's lifetime: immediately after the UIApplication delegate's applicationDidFinishLaunching method was called. When SDL's window and gl context creation functions were invoked, it used the already-made window and gl context, rather than creating them on the fly.
-- David Ludwig
On Dec 22, 2010, at 10:12 AM, akr wrote:
> My code is running pretty well on iOS4. Pressing the home button my app goes into background as expected. (minimized)
> But when I want to bring it back in screen (doubleclick on "home") it comes up with a black screen. I know that its
> running because I can hear the music playing. How can I restore the screen? I am using opengl.
> Guess its about restoring opengles textures.
> SDL mailing list
> SDL at lists.libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL