dsound: Disable property sets if hardware doesn't support it.

This commit is contained in:
Maarten Lankhorst 2007-05-30 19:21:29 +02:00 committed by Alexandre Julliard
parent 13af056628
commit 3e1fcc0eb7
1 changed files with 10 additions and 0 deletions

View File

@ -197,9 +197,19 @@ HRESULT IKsBufferPropertySetImpl_Create(
IDirectSoundBufferImpl *dsb,
IKsBufferPropertySetImpl **piks)
{
PIDSDRIVERPROPERTYSET ps = NULL;
IKsBufferPropertySetImpl *iks;
TRACE("(%p,%p)\n",dsb,piks);
if (!dsb->hwbuf)
return DSERR_INVALIDPARAM;
IDsDriver_QueryInterface(dsb->hwbuf, &IID_IDsDriverPropertySet, (void **)&ps);
if (!ps)
return DSERR_INVALIDPARAM;
IUnknown_Release(ps);
iks = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*iks));
if (iks == 0) {
WARN("out of memory\n");