Use the sticky focus flag so audio isn't muted when application is switched.
authorSam Lantinga <slouken@libsdl.org>
Thu, 25 Oct 2001 08:45:17 +0000
changeset 217 add626b825bb
parent 216 e2a10730ae94
child 218 91a5db3e930a
Use the sticky focus flag so audio isn't muted when application is switched.
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) ||