Author: greatlrd
Date: Sun Jun 10 07:10:20 2007
New Revision: 27098
URL:
http://svn.reactos.org/svn/reactos?rev=27098&view=rev
Log:
Building part of guidDeviceIdentifier in GetDeviceIdentifier
left to coding in is REV_ SUBSYS_ liDriverVersion
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c Sun Jun 10 07:10:20 2007
@@ -463,6 +463,7 @@
DWORD strSize = MAX_DDDEVICEID_STRING;
char *pdest;
char* pcCnvEnd;
+ long data;
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT) iface;
@@ -518,6 +519,10 @@
{
ZeroMemory(pDDDI->szDriver,MAX_DDDEVICEID_STRING);
}
+ else
+ {
+ strcat(pDDDI->szDriver,".dll");
+ }
RegCloseKey(hKey);
}
@@ -538,6 +543,16 @@
pDDDI->dwVendorId =strtol ( &pdest[4], &pcCnvEnd, 16);
/* FIXME pDDDI->guidDeviceIdentifier, pDDDI->dwWHQLLevel */
+
+ memcpy(&pDDDI->guidDeviceIdentifier,
&CLSID_DirectDraw,sizeof(GUID));
+
+ pDDDI->guidDeviceIdentifier.Data1 =
pDDDI->guidDeviceIdentifier.Data1 ^ pDDDI->dwVendorId;
+
+ data = (pDDDI->guidDeviceIdentifier.Data3 <<16) |
pDDDI->guidDeviceIdentifier.Data2;
+ data = data ^ pDDDI->dwDeviceId;
+ pDDDI->guidDeviceIdentifier.Data2 = data & 0xFFFF;
+ pDDDI->guidDeviceIdentifier.Data3 = (data>>16) &
0xFFFF;
+
pDDDI->dwWHQLLevel = 0;
retVal = DD_OK;