dsound: Move assignment of DSBCAPS_LOC to primary buffer creation time.
This commit is contained in:
parent
efc001a21f
commit
4ef6e8eaa0
|
@ -1594,6 +1594,10 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
|
||||||
*ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary);
|
*ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary);
|
||||||
} else {
|
} else {
|
||||||
device->dsbd = *dsbd;
|
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));
|
hres = PrimaryBufferImpl_Create(device, (PrimaryBufferImpl**)&(device->primary), &(device->dsbd));
|
||||||
if (device->primary) {
|
if (device->primary) {
|
||||||
IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary));
|
IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary));
|
||||||
|
|
|
@ -980,9 +980,6 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
|
||||||
}
|
}
|
||||||
|
|
||||||
caps->dwFlags = device->dsbd.dwFlags;
|
caps->dwFlags = device->dsbd.dwFlags;
|
||||||
if (device->hwbuf) caps->dwFlags |= DSBCAPS_LOCHARDWARE;
|
|
||||||
else caps->dwFlags |= DSBCAPS_LOCSOFTWARE;
|
|
||||||
|
|
||||||
caps->dwBufferBytes = device->buflen;
|
caps->dwBufferBytes = device->buflen;
|
||||||
|
|
||||||
/* Windows reports these as zero */
|
/* Windows reports these as zero */
|
||||||
|
|
Loading…
Reference in New Issue