Problem switching apps when full-screen game is...

BlitzMax Forums/BlitzMax Programming/Problem switching apps when full-screen game is...

Grey Alien(Posted 2009) [#1]
...minimised.

Some users are saying that if a game is running in full-screen mode and they use Alt+Tab or the Windows key to go to the Desktop which already has a few apps on, then switch between apps by using the tabs at the bottom or by clicking on other open windows, that the game sometimes just maximises to full screen again - even though they never selected it! This is on XP.

Anyone know why this could occur? It's not happening for me so I'm finding it very weird.

My game is waiting for the EVENT_APPRESUME and when it gets it, it will unpause and play the music etc. But BlitzMax (or Windows) must be handling the actual maximising of the full-screen app again right? So I'm not sure this issue is anything I can control...


MGE(Posted 2009) [#2]
Not sure if this will help, but I havn't had any problems yet, I'm doing something different. I call this right before I start my render loop.

Function DoAppSuspended()
  '
  If AppSuspended()
   '
   While AppSuspended()
    '
    ' Render pause, etc, etc.
    '
   Wend
   '
   ' Re start here.
   '
  EndIf
  '
 End Function



Grey Alien(Posted 2009) [#3]
I do similar stuff but I don't think it's the Blitzmax code at all, it seems to be some windows or Blitzmax thing, I just wonder what it is and if it's possible to get an internal fix...


MGE(Posted 2009) [#4]
Sounds like the "EVENT_APPRESUME" event is being triggered falsely. I wonder if using the AppSuspended() check instead bypasses that?


Grey Alien(Posted 2009) [#5]
Agreed it sounds like a false trigger but why? And can it be avoided by a module tweak? Or maybe it's just a windows issue. Actually I should find out if it happens with other games on the PC which would be interesting to know.


Grey Alien(Posted 2009) [#6]
I wonder if using the AppSuspended() check instead bypasses that?
Just checked polledinput.bmx and AppSuspended() just returns a flag called Suspended which is set by EVENT_APPRESUME anyway...