From 008e9d42570024757c2b5a39e9755bd8df2a3b21 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 25 Oct 2001 08:45:17 +0000 Subject: [PATCH] Use the sticky focus flag so audio isn't muted when application is switched. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40218 --- src/audio/windx5/SDL_dx5audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio/windx5/SDL_dx5audio.c b/src/audio/windx5/SDL_dx5audio.c index 38d188ded..1356a4097 100644 --- a/src/audio/windx5/SDL_dx5audio.c +++ b/src/audio/windx5/SDL_dx5audio.c @@ -441,6 +441,7 @@ static int CreatePrimary(LPDIRECTSOUND sndObj, HWND focus, 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 @@ static int CreateSecondary(LPDIRECTSOUND sndObj, HWND focus, #endif if ( ! focus ) { format.dwFlags |= DSBCAPS_GLOBALFOCUS; + } else { + format.dwFlags |= DSBCAPS_STICKYFOCUS; } format.dwBufferBytes = numchunks*chunksize; if ( (format.dwBufferBytes < DSBSIZE_MIN) ||