GLBasic forum

Main forum => GLBasic - en => Topic started by: spicypixel on 2011-Nov-28

Title: Question about AUTOPAUSE and GLB_ON_PAUSE
Post by: spicypixel on 2011-Nov-28
I have version v10.179 of GLB and I have tried setting AUTOPAUSE to TRUE and then have a flag Pause% which is set within the GLB_ON_PAUSE sub-routine to be TRUE and within GLB_ON_RESUME I set Pause% to be FALSE.

From within my game loop if Pause% is set by pressing an Icon on-screen it does indeed pause the game and displays PAUSED on-screen. However if I lose focus of the window I presumed it would do the same thing. In-fact it does nothing at all the game happily carries on playing music and animating the sprites. I have also tried setting AUTOPAUSE to FALSE in-case my understanding of how it worked was wrong. Again it makes no difference and simply continues to play music and animate sprites.

I tried commenting out the AUTOPAUSE command completely as I know before when I lost focus of the window it displayed <paused> in the title of the window. Now it doesn't do that either.

Please advise, thanks in advance.
Title: Re: Question about AUTOPAUSE and GLB_ON_PAUSE
Post by: Kitty Hello on 2011-Nov-28
AUTOPUASE TRUE sets the app to <pause> when you Alt-Tab to another app.