Commit 4ef6e8ea authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

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

parent efc001a2
......@@ -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));
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment