fixed so only NULL and DDCREATE_HARDWAREONLY are accpect when you linking two directdraw interface.

svn path=/trunk/; revision=25019
This commit is contained in:
Magnus Olsen
2006-12-02 19:26:55 +00:00
parent a9e3149429
commit aa6252fc13
+13 -1
View File
@@ -912,12 +912,24 @@ Create_DirectDraw (LPGUID pGUID,
else
{
/* We got the DirectDraw interface alloc and we need create the link */
LPDDRAWI_DIRECTDRAW_INT newThis;
LPDDRAWI_DIRECTDRAW_INT newThis;
newThis = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT));
if (newThis == NULL)
{
return DDERR_OUTOFMEMORY;
}
/* we need check the GUID lpGUID what type it is */
if (pGUID != DDCREATE_HARDWAREONLY)
{
if (pGUID !=NULL)
{
This = newThis;
return DDERR_INVALIDDIRECTDRAWGUID;
}
}
newThis->lpLink = This;
This = newThis;
}