Added error checking to IDirectSound_Compact.
Fixed IDirectSoundImpl_Create to return DSERR_NODRIVER for a bad device IID.
This commit is contained in:
parent
b0da80eda1
commit
b6ab40e977
|
@ -612,6 +612,16 @@ static HRESULT WINAPI IDirectSoundImpl_Compact(
|
|||
ICOM_THIS(IDirectSoundImpl,iface);
|
||||
TRACE("(%p)\n",This);
|
||||
|
||||
if (This->initialized == FALSE) {
|
||||
WARN("not initialized\n");
|
||||
return DSERR_UNINITIALIZED;
|
||||
}
|
||||
|
||||
if (This->priolevel != DSSCL_PRIORITY) {
|
||||
WARN("incorrect priority level\n");
|
||||
return DSERR_PRIOLEVELNEEDED;
|
||||
}
|
||||
|
||||
return DS_OK;
|
||||
}
|
||||
|
||||
|
@ -746,8 +756,8 @@ HRESULT WINAPI IDirectSoundImpl_Create(
|
|||
}
|
||||
|
||||
if (found == FALSE) {
|
||||
WARN("No device found matching given ID - trying with default one !\n");
|
||||
wod = ds_default_playback;
|
||||
WARN("No device found matching given ID!\n");
|
||||
return DSERR_NODRIVER;
|
||||
}
|
||||
|
||||
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
|
||||
|
|
Loading…
Reference in New Issue