mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
IDirectSoundBuffer.GetCaps should fail if caps.dwSize is not set.
This commit is contained in:
parent
2aff85c9c8
commit
78561f3eb3
@ -766,13 +766,9 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCaps(
|
||||
ICOM_THIS(IDirectSoundBufferImpl,iface);
|
||||
TRACE("(%p)->(%p)\n",This,caps);
|
||||
|
||||
if (caps == NULL)
|
||||
if (caps == NULL || caps->dwSize!=sizeof(*caps))
|
||||
return DSERR_INVALIDPARAM;
|
||||
|
||||
/* I think we should check this value, not set it. See */
|
||||
/* Inside DirectX, p215. That should apply here, too. */
|
||||
caps->dwSize = sizeof(*caps);
|
||||
|
||||
caps->dwFlags = This->dsbd.dwFlags;
|
||||
if (This->hwbuf) caps->dwFlags |= DSBCAPS_LOCHARDWARE;
|
||||
else caps->dwFlags |= DSBCAPS_LOCSOFTWARE;
|
||||
|
@ -754,13 +754,9 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
|
||||
ICOM_THIS(PrimaryBufferImpl,iface);
|
||||
TRACE("(%p)->(%p)\n",This,caps);
|
||||
|
||||
if (caps == NULL)
|
||||
if (caps == NULL || caps->dwSize!=sizeof(*caps))
|
||||
return DSERR_INVALIDPARAM;
|
||||
|
||||
/* I think we should check this value, not set it. See */
|
||||
/* Inside DirectX, p215. That should apply here, too. */
|
||||
caps->dwSize = sizeof(*caps);
|
||||
|
||||
caps->dwFlags = This->dsbd.dwFlags;
|
||||
if (This->dsound->hwbuf) caps->dwFlags |= DSBCAPS_LOCHARDWARE;
|
||||
else caps->dwFlags |= DSBCAPS_LOCSOFTWARE;
|
||||
|
Loading…
Reference in New Issue
Block a user