Mercurial > sdl-ios-xcode
diff src/audio/windx5/SDL_dx5audio.c @ 217:add626b825bb
Use the sticky focus flag so audio isn't muted when application is switched.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 25 Oct 2001 08:45:17 +0000 |
parents | 7c47e511459d |
children | e8157fcb3114 |
line wrap: on
line diff
--- 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) ||