- prevent wz from pausing in multiplayer when focus is lost

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1716 4a71c877-e1ca-e34f-864e-861f7616d084
master
Roman C 2007-05-27 14:29:16 +00:00
parent 02c6705f61
commit b2bcb79c99
1 changed files with 20 additions and 17 deletions

View File

@ -606,6 +606,8 @@ static void handleActiveEvent(SDL_Event * event)
// Ignore focus loss through SDL_APPMOUSEFOCUS, since it mostly happens accidentialy // Ignore focus loss through SDL_APPMOUSEFOCUS, since it mostly happens accidentialy
// active.state is a bitflag! Mixed events (eg. APPACTIVE|APPMOUSEFOCUS) will thus not be ignored. // active.state is a bitflag! Mixed events (eg. APPACTIVE|APPMOUSEFOCUS) will thus not be ignored.
if ( event->active.state != SDL_APPMOUSEFOCUS ) if ( event->active.state != SDL_APPMOUSEFOCUS )
{
if(!bMultiPlayer) //can't pause in multiplayer
{ {
if ( event->active.gain == 1 ) if ( event->active.gain == 1 )
{ {
@ -633,6 +635,7 @@ static void handleActiveEvent(SDL_Event * event)
inputLooseFocus(); inputLooseFocus();
} }
} }
}
} }