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

oldstable
Maarten Lankhorst 2007-08-21 21:01:53 +02:00 committed by Alexandre Julliard
parent efc001a21f
commit 4ef6e8eaa0
2 changed files with 4 additions and 3 deletions

View File

@ -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));

View File

@ -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 */