PocketMatrix forums

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

Problems with button responsivness, solved?

I have set my target fps really high (90) so every cycle availible will go to process the game :)

In my pocket PC it did make the button response really slugish, often the buttons didn't work at all.
The automatic background light function also stopped to work!?

I really don't know why these problems occur, but I think I did solve it by adding a

Code:
sleep(0);
instruction to the code path.

FYI. I use GD 2.04, single threaded and Hekkus.
Sorry for the anon msg... it was me who posted it.

/Okku
You could check the flags sent to ProcessNextFrame.. If (dwFlags & GDAPP_FRAMETIMEOVERFLOW) this indicates that you are trying to push the little Pocket PC beyond it's limits...

You could do:

if (dwFlags & GDAPP_FRAMETIMEOVERFLOW)
{
Sleep(0);
}

I thought this wasn't an issue anymore since GapiDraw now uses a single-threaded model.. Appearantly it is. Thanks for notifying me, I'll add a Sleep(0) to CGapiApplication if it cannot keep up with the target number of FPS in the next release (2.10).

//Johan