Maarten Lankhorst : dsound: Move assignment of DSBCAPS_LOC to primary buffer creation time.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 22 06:23:13 CDT 2007


Module: wine
Branch: master
Commit: 4ef6e8eaa09dde9212038fa216b900dda42f099b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4ef6e8eaa09dde9212038fa216b900dda42f099b

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Tue Aug 21 21:01:53 2007 +0200

dsound: Move assignment of DSBCAPS_LOC to primary buffer creation time.

---

 dlls/dsound/dsound.c  |    4 ++++
 dlls/dsound/primary.c |    3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 0cb66ca..bbbbd0d 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -1594,6 +1594,10 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
             *ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary);
         } else {
            device->dsbd = *dsbd;
+           device->dsbd.dwFlags &= ~(DSBCAPS_LOCHARDWARE | DSBCAPS_LOCSOFTWARE);
+           if (device->hwbuf)
+               device->dsbd.dwFlags |= DSBCAPS_LOCHARDWARE;
+           else device->dsbd.dwFlags |= DSBCAPS_LOCSOFTWARE;
            hres = PrimaryBufferImpl_Create(device, (PrimaryBufferImpl**)&(device->primary), &(device->dsbd));
            if (device->primary) {
                IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary));
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index ac1a17e..65dc7d6 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -980,9 +980,6 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
 	}
 
 	caps->dwFlags = device->dsbd.dwFlags;
-	if (device->hwbuf) caps->dwFlags |= DSBCAPS_LOCHARDWARE;
-	else caps->dwFlags |= DSBCAPS_LOCSOFTWARE;
-
 	caps->dwBufferBytes = device->buflen;
 
 	/* Windows reports these as zero */




More information about the wine-cvs mailing list