diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 7b93455bbf..e50ef58108 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 330f5904a3..25eb010695 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);