(Some?) Win32/64 does not re-enable sound after app is minimized and restored, so (temporarily?) add a -bgsound switch to disable sound being muted

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@238 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Steven 2010-07-23 20:58:04 +00:00
parent e9192f232a
commit 70dc6cb641

View file

@ -100,11 +100,13 @@ int main(int argc, char *argv[])
case SDL_ACTIVEEVENT: case SDL_ACTIVEEVENT:
if (event.active.state & (SDL_APPACTIVE|SDL_APPINPUTFOCUS)) if (event.active.state & (SDL_APPACTIVE|SDL_APPINPUTFOCUS))
{ {
if (!COM_CheckParm("-bgsound")) {
if (event.active.gain) if (event.active.gain)
S_UnblockSound(); S_UnblockSound();
else else
S_BlockSound(); S_BlockSound();
} }
}
break; break;
case SDL_MOUSEMOTION: case SDL_MOUSEMOTION:
IN_MouseMove(event.motion.xrel, event.motion.yrel); IN_MouseMove(event.motion.xrel, event.motion.yrel);