Ok. I'm a bit confused. So GLB_ON_PAUSE executes its code, then returns to your main code? But, certainly to be consistent cross platform, you should definitely not do a SHOWSCREEN anywhere (an iPhone app is killed off if it attempts to draw to screen when it doesnt have focus) ... so I'll have to implement a completely seperate 'lostfocus' routine in addition to my 'normal' pause routine, because that of course shows the 'paused-click to continue' type stuff and SHOWSCREENs.
But the thing is, in my experience, if you have ANY kind of loop WITHOUT a showscreen, that can kill your app too.... so my original question remains... what do I *do* while paused, even if I'm going to do it outside those subs, even if I want to do nothing but wait for the app to resume so I can display stuff again?
For example. Here's some really simple test code as a basic framework to include losing and regaining focus... except it crashes (app becomes non-responsive under Windows)... it never resumes from pause (and of course I can't step through it to debug!). So what should I be doing instead?
Just to clarify my point about a loop crashing if no showscreen... IF you add SHOWSCREEN to the lostFocusLoop in this code, it no longer crashes under Windows... except that's no good to me at all on an iPhone, because that WILL crash it!
IF hasLostFocus = FALSE
ELSEIF hasLostFocus = TRUE
WHILE hasLostFocus = TRUE
hasLostFocus% = FALSE
hasLostFocus% = TRUE