Commit 0adf2af7 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

dsound: Fixup IDirectSoundCaptureBuffer_QueryInterface.

parent a330b011
...@@ -50,7 +50,7 @@ typedef struct IDirectSoundCaptureBufferImpl ...@@ -50,7 +50,7 @@ typedef struct IDirectSoundCaptureBufferImpl
IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8_iface; IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8_iface;
IDirectSoundNotify IDirectSoundNotify_iface; IDirectSoundNotify IDirectSoundNotify_iface;
LONG numIfaces; /* "in use interfaces" refcount */ LONG numIfaces; /* "in use interfaces" refcount */
LONG ref, refn; LONG ref, refn, has_dsc8;
/* IDirectSoundCaptureBuffer fields */ /* IDirectSoundCaptureBuffer fields */
DirectSoundCaptureDevice *device; DirectSoundCaptureDevice *device;
DSCBUFFERDESC *pdscbd; DSCBUFFERDESC *pdscbd;
...@@ -240,8 +240,9 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_QueryInterface(IDirectSoundC ...@@ -240,8 +240,9 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_QueryInterface(IDirectSoundC
*ppobj = NULL; *ppobj = NULL;
if ( IsEqualGUID( &IID_IDirectSoundCaptureBuffer, riid ) || if ( IsEqualIID( &IID_IUnknown, riid ) ||
IsEqualGUID( &IID_IDirectSoundCaptureBuffer8, riid ) ) { IsEqualIID( &IID_IDirectSoundCaptureBuffer, riid ) ||
(This->has_dsc8 && IsEqualIID( &IID_IDirectSoundCaptureBuffer8, riid )) ) {
IDirectSoundCaptureBuffer8_AddRef(iface); IDirectSoundCaptureBuffer8_AddRef(iface);
*ppobj = iface; *ppobj = iface;
return S_OK; return S_OK;
...@@ -1233,6 +1234,8 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_CreateCaptureBuffer(IDirectSoundCa ...@@ -1233,6 +1234,8 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_CreateCaptureBuffer(IDirectSoundCa
if (hr != DS_OK) if (hr != DS_OK)
WARN("IDirectSoundCaptureBufferImpl_Create failed\n"); WARN("IDirectSoundCaptureBufferImpl_Create failed\n");
else
This->device->capture_buffer->has_dsc8 = This->has_dsc8;
return hr; return hr;
} }
......
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