Skip to content

Commit

Permalink
Use the sticky focus flag so audio isn't muted when application is sw…
Browse files Browse the repository at this point in the history
…itched.
  • Loading branch information
slouken committed Oct 25, 2001
1 parent 3588002 commit 1cc45bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/audio/windx5/SDL_dx5audio.c
Expand Up @@ -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
Expand Down Expand Up @@ -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) ||
Expand Down

0 comments on commit 1cc45bd

Please sign in to comment.