Author: greatlrd
Date: Sun Jun 10 07:33:17 2007
New Revision: 27099
URL:
http://svn.reactos.org/svn/reactos?rev=27099&view=rev
Log:
Only dwWHQLLevel are left todo in GetDeviceIdentifier
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:33:17 2007
@@ -463,7 +463,7 @@
DWORD strSize = MAX_DDDEVICEID_STRING;
char *pdest;
char* pcCnvEnd;
- long data;
+ long *lpdata;
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT) iface;
@@ -542,18 +542,23 @@
pdest = strstr(DisplayDeviceA.DeviceID,"VEN_");
pDDDI->dwVendorId =strtol ( &pdest[4], &pcCnvEnd, 16);
- /* FIXME pDDDI->guidDeviceIdentifier, pDDDI->dwWHQLLevel */
-
+ /* Count out the guidDeviceIdentifier */
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;
-
-
+ lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data2;
+ *lpdata = *lpdata ^ pDDDI->dwDeviceId;
+
+ lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4;
+ *lpdata = *lpdata ^ pDDDI->dwSubSysId;
+ *lpdata = *lpdata ^ pDDDI->liDriverVersion.LowPart;
+
+ lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4[4];
+ *lpdata = *lpdata ^ pDDDI->dwRevision;
+ *lpdata = *lpdata ^ pDDDI->liDriverVersion.HighPart;
+
+ /* FIXME pDDDI->dwWHQLLevel */
pDDDI->dwWHQLLevel = 0;
retVal = DD_OK;
}