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 217add626b825bb
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
     1.1 --- a/src/audio/windx5/SDL_dx5audio.c	Thu Oct 25 06:22:38 2001 +0000
     1.2 +++ b/src/audio/windx5/SDL_dx5audio.c	Thu Oct 25 08:45:17 2001 +0000
     1.3 @@ -441,6 +441,7 @@
     1.4  	memset(&format, 0, sizeof(format));
     1.5  	format.dwSize = sizeof(format);
     1.6  	format.dwFlags=(DSBCAPS_PRIMARYBUFFER|DSBCAPS_GETCURRENTPOSITION2);
     1.7 +	format.dwFlags |= DSBCAPS_STICKYFOCUS;
     1.8  #ifdef USE_POSITION_NOTIFY
     1.9  	format.dwFlags |= DSBCAPS_CTRLPOSITIONNOTIFY;
    1.10  #endif
    1.11 @@ -525,6 +526,8 @@
    1.12  #endif
    1.13  	if ( ! focus ) {
    1.14  		format.dwFlags |= DSBCAPS_GLOBALFOCUS;
    1.15 +	} else {
    1.16 +		format.dwFlags |= DSBCAPS_STICKYFOCUS;
    1.17  	}
    1.18  	format.dwBufferBytes = numchunks*chunksize;
    1.19  	if ( (format.dwBufferBytes < DSBSIZE_MIN) ||