If DirectDrawCreate gets passed a IDirectDraw{2,4,7} interface, get
this interface and do not use IDirectDraw.
This commit is contained in:
parent
8a5de1c92f
commit
c9afc46efa
|
@ -315,6 +315,19 @@ HRESULT WINAPI DirectDrawCreate(
|
||||||
break;
|
break;
|
||||||
ddraw_drivers[drvindex] = NULL; /* mark this one as unusable */
|
ddraw_drivers[drvindex] = NULL; /* mark this one as unusable */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ||
|
||||||
|
IsEqualGUID( &IID_IDirectDraw4, lpGUID ) ||
|
||||||
|
IsEqualGUID( &IID_IDirectDraw7, lpGUID )
|
||||||
|
) {
|
||||||
|
LPVOID x;
|
||||||
|
ret = IDirectDraw_QueryInterface(*lplpDD,lpGUID,&x);
|
||||||
|
IDirectDraw_Release(*lplpDD); /* either drop 1 refcount, or release */
|
||||||
|
if (!ret)
|
||||||
|
*lplpDD = x;
|
||||||
|
else
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
wc.style = CS_GLOBALCLASS;
|
wc.style = CS_GLOBALCLASS;
|
||||||
wc.lpfnWndProc = DDWndProc;
|
wc.lpfnWndProc = DDWndProc;
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
|
|
Loading…
Reference in New Issue