the latest version of Starling in GitHub is finally able to handle a lost device context.
To activate that feature, you have to call:
Starling.handleLostContext = true;
before you create your Starling instance. That's it!
Beware, though, that your game will now need more memory than before, because all Bitmaps of your textures need to remain in RAM so that Starling can restore the textures when the context is lost.
That said: I need your help to test this, guys! Since I'm developing on a Mac, I could not reproduce a real device loss -- you can only do that in Windows, and even there it does not happen on every system.
Thus, it would be great if one (or more) of you could try the following:
Pull the latest GitHub version of Starling
Open up the Demo project
set "Starling.handleLostContext" to "false" (!) in "Startup.as"
try if you can trigger a lost context (e.g. by locking Windows, putting Windows into sleep mode, starting the screen saver -- depends on the system)
you know that you've succeeded when the game goes black and an error message appears
now, set "Starling.handleLostContext" to "true"
and reproduce the lost context
If I was successful, the demo should continue as if nothing happened. If I wasn't -- please copy the stack trace and paste it into this forum thread.
Thanks in advance for your help!!