[SDL] iPhone iOS4+SDL+Multitasking cannot restore from suspend

akr a.kindlbacher at gmx.de
Thu Dec 30 01:11:02 PST 2010


Thank you for this hint! Its seems to be a new feature of iOS4.2. The screen is restored when app comes back from suspend.
Works great! I only have to tell my code not to draw while being in background. Because this is not permitted and would cause a exception.

I am using 3gs, was using iOS 4.1, now 4.2, "standard" official phone from the store.

Fantastic. Thanks so much Vittorio ! This was a tough one.

andreas


Vittorio G. wrote:
> I get the exact behaviour of yours on jailbroken iOS 4.1 but the
> screen is restored fine on a standard iOS 4.2
> What version of iOS are you using and is the device jailbroken? It
> might be either because of iOS < 4.2 or because it's jailbroken (i
> suspect the latter)
> 
> Vittorio
> 
> On Thu, Dec 23, 2010 at 1:02 AM, Alex Barry <alex.barry at gmail.com> wrote:
> 
> > Everytime you get a window event, you'll probably have to reload your
> > textures.  Just listen for a SDL_WM event and automatically call a function
> > to reload whatever textures you are using.  You can probably ignore window
> > movement, but resizing/iconifying will certainly need you to reload your
> > textures.
> > 
> > Take care,
> > -Oz
> > 
> > On Wed, Dec 22, 2010 at 10:12 AM, akr <a.kindlbacher at gmx.de> wrote:
> > 
> > > 
> > > Hi,
> > > 
> > > 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
> > > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> > > 
> > > 
> > 
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> > 
> > 
> > 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20101230/af6386df/attachment-0008.htm>


More information about the SDL mailing list