Commit c9afc46e authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

If DirectDrawCreate gets passed a IDirectDraw{2,4,7} interface, get

this interface and do not use IDirectDraw.
parent 8a5de1c9
......@@ -315,6 +315,19 @@ HRESULT WINAPI DirectDrawCreate(
break;
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.lpfnWndProc = DDWndProc;
wc.cbClsExtra = 0;
......
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