Maarten Lankhorst : dsound: Fixup IDirectSoundCaptureBuffer_QueryInterface.
Module: wine Branch: master Commit: 0adf2af7ff1fe6a5d1ace4c2324c68ecffb76d8f URL: http://source.winehq.org/git/wine.git/?a=commit;h=0adf2af7ff1fe6a5d1ace4c232... Author: Maarten Lankhorst <wine(a)mblankhorst.nl> Date: Mon May 16 09:55:43 2016 -0500 dsound: Fixup IDirectSoundCaptureBuffer_QueryInterface. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsound/capture.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 0764261..412b59e 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -50,7 +50,7 @@ typedef struct IDirectSoundCaptureBufferImpl IDirectSoundCaptureBuffer8 IDirectSoundCaptureBuffer8_iface; IDirectSoundNotify IDirectSoundNotify_iface; LONG numIfaces; /* "in use interfaces" refcount */ - LONG ref, refn; + LONG ref, refn, has_dsc8; /* IDirectSoundCaptureBuffer fields */ DirectSoundCaptureDevice *device; DSCBUFFERDESC *pdscbd; @@ -240,8 +240,9 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_QueryInterface(IDirectSoundC *ppobj = NULL; - if ( IsEqualGUID( &IID_IDirectSoundCaptureBuffer, riid ) || - IsEqualGUID( &IID_IDirectSoundCaptureBuffer8, riid ) ) { + if ( IsEqualIID( &IID_IUnknown, riid ) || + IsEqualIID( &IID_IDirectSoundCaptureBuffer, riid ) || + (This->has_dsc8 && IsEqualIID( &IID_IDirectSoundCaptureBuffer8, riid )) ) { IDirectSoundCaptureBuffer8_AddRef(iface); *ppobj = iface; return S_OK; @@ -1233,6 +1234,8 @@ static HRESULT WINAPI IDirectSoundCaptureImpl_CreateCaptureBuffer(IDirectSoundCa if (hr != DS_OK) WARN("IDirectSoundCaptureBufferImpl_Create failed\n"); + else + This->device->capture_buffer->has_dsc8 = This->has_dsc8; return hr; }
participants (1)
-
Alexandre Julliard