Module: wine Branch: master Commit: 0e5dcc2c841be0a4311d1915d073d2775fe436b4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e5dcc2c841be0a4311d1915d0...
Author: Michael Stefaniuc mstefani@redhat.de Date: Mon Dec 21 12:08:09 2015 +0100
dsound: Fail to create a version 8 3d buffer with DSBCAPS_CTRLPAN.
Signed-off-by: Michael Stefaniuc mstefani@redhat.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dsound/dsound.c | 5 +++++ dlls/dsound/tests/ds3d8.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 7b93455..e50ef58 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -542,6 +542,11 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer( return DSERR_INVALIDPARAM; }
+ if (from8 && (dsbd->dwFlags & DSBCAPS_CTRL3D) && (dsbd->dwFlags & DSBCAPS_CTRLPAN)) { + WARN("invalid parameter: DSBCAPS_CTRL3D and DSBCAPS_CTRLPAN cannot be used together\n"); + return DSERR_INVALIDPARAM; + } + hres = IDirectSoundBufferImpl_Create(device, &dsb, dsbd); if (dsb) { *ppdsb = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface; diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 330f590..25eb010 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -654,7 +654,6 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play, /* Invalid flag combination */ bufdesc.dwFlags|=DSBCAPS_CTRLPAN; rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - todo_wine ok(rc==DSERR_INVALIDPARAM, "IDirectSound8_CreateSoundBuffer(secondary) should have " "returned DSERR_INVALIDPARAM, returned %08x\n", rc);