changeset 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 e2a10730ae94
children 91a5db3e930a
files src/audio/windx5/SDL_dx5audio.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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) ||