PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

system event - ultimate solution?

I have a several reports that my game hangs right after a system event shows up(like low battery or such).
I'm using the latest "bugfixed" version PF_0_8_1_bugfix_2 which adds sleep when game's window is minimized. And well, it does work fine on my device. I also call hekkus's sound.suspend() in GameSuspend().

But why can it be hanging on other devices?
Is there anything I can do?
I've experienced the same problem once.

But then I've checked the code and there was a problem with fps counter if the gameloop isn't called too long.
So I added "fps restoration":

Code:

void Pyromania::GameResume()
{
SoundMusic.Resume();
RestoreFPS();
}


Possibly your have pretty the same problem, just look in your time-related code ;)