Commit 88ff4321 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

dsound Add uninitialized check.

parent a8e59b1c
......@@ -584,10 +584,16 @@ static HRESULT WINAPI IDirectSoundImpl_SetCooperativeLevel(
IDirectSoundImpl *This = (IDirectSoundImpl *)iface;
TRACE("(%p,%p,%s)\n",This,hwnd,dumpCooperativeLevel(level));
if (This->device == NULL) {
WARN("not initialized\n");
return DSERR_UNINITIALIZED;
}
if (level==DSSCL_PRIORITY || level==DSSCL_EXCLUSIVE) {
WARN("level=%s not fully supported\n",
level==DSSCL_PRIORITY ? "DSSCL_PRIORITY" : "DSSCL_EXCLUSIVE");
}
This->device->priolevel = level;
return DS_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment