# HG changeset patch # User Sam Lantinga # Date 1003999517 0 # Node ID add626b825bb742ba61b280c105d3f83f2dd7944 # Parent e2a10730ae94468d4dddfe8385177405f915f5c7 Use the sticky focus flag so audio isn't muted when application is switched. diff -r e2a10730ae94 -r add626b825bb src/audio/windx5/SDL_dx5audio.c --- a/src/audio/windx5/SDL_dx5audio.c Thu Oct 25 06:22:38 2001 +0000 +++ b/src/audio/windx5/SDL_dx5audio.c Thu Oct 25 08:45:17 2001 +0000 @@ -441,6 +441,7 @@ memset(&format, 0, sizeof(format)); format.dwSize = sizeof(format); format.dwFlags=(DSBCAPS_PRIMARYBUFFER|DSBCAPS_GETCURRENTPOSITION2); + format.dwFlags |= DSBCAPS_STICKYFOCUS; #ifdef USE_POSITION_NOTIFY format.dwFlags |= DSBCAPS_CTRLPOSITIONNOTIFY; #endif @@ -525,6 +526,8 @@ #endif if ( ! focus ) { format.dwFlags |= DSBCAPS_GLOBALFOCUS; + } else { + format.dwFlags |= DSBCAPS_STICKYFOCUS; } format.dwBufferBytes = numchunks*chunksize; if ( (format.dwBufferBytes < DSBSIZE_MIN) ||