more importantly: if one pushes the power button, while an app is running, this app will loose focus, but however it will still keep running. shouldn't we also stop rendering in that case, in order to not drain the battery that much?
so my question: shouldn't we already stop rendering when we lose focus?
also the app will go into background when there are calls incoming. wouldn't we still be playing back any kinds of sounds still? I only got an ipad so I don't care that much and I have no means of testing, but I was just wondering.
Actually, I've already written some code in that direction but never had the opportunity to test it on device.
In code/src/main/orxiPhone.m there's this code:
So as you can see we send some orxEVENT to synchronize with the info we get from iOS. We also force to inhibit the redering unless the user handles the event and asks us not to do it (not sure someone would want to do that anytime but at least the option's there ^^).
I didn't think of sound though and I only did the render part as Apple's doc says it'd crash the app if any OpenGL call were to be made while the app is in background.
As you can see, the user can listen to those events and do whatever he wants like pausing his game and disabling his objects (which would then mute the sound) when needed.