Display device enumeration in d3d9
authorGregor Brunmar <gbrunmar.ros@gmail.com>
Sat, 29 Dec 2007 15:19:13 +0000 (15:19 +0000)
committerGregor Brunmar <gbrunmar.ros@gmail.com>
Sat, 29 Dec 2007 15:19:13 +0000 (15:19 +0000)
svn path=/trunk/; revision=31492

reactos/dll/directx/d3d9/d3d9_helpers.c
reactos/dll/directx/d3d9/d3d9_private.h

index d73daa9..b74d200 100644 (file)
 
 #define MEM_ALIGNMENT 0x20
 
-static LPCSTR D3dDebugRegPath = "Software\\Microsoft\\Direct3D";
+static LPCSTR D3D9_DebugRegPath = "Software\\Microsoft\\Direct3D";
 
 static const GUID DISPLAY_GUID = { 0x67685559, 0x3106, 0x11D0, { 0xB9, 0x71, 0x00, 0xAA, 0x00, 0x34, 0x2F, 0x9F } };
 
+static CHAR D3D9_PrimaryDeviceName[32];
+
 LPDIRECT3D9_INT impl_from_IDirect3D9(LPDIRECT3D9 iface)
 {
     return (LPDIRECT3D9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3D9_INT, lpVtbl));
@@ -28,7 +30,7 @@ BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataB
     DWORD Type;
     LONG Ret;
 
-    if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, D3dDebugRegPath, 0, KEY_QUERY_VALUE, &hKey))
+    if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, D3D9_DebugRegPath, 0, KEY_QUERY_VALUE, &hKey))
         return FALSE;
 
     Ret = RegQueryValueEx(hKey, ValueName, 0, &Type, DataBuffer, DataBufferSize);
@@ -63,6 +65,68 @@ HRESULT FormatDebugString(IN OUT LPSTR Buffer, IN LONG BufferSize, IN LPCSTR For
     return 0;
 }
 
+static BOOL GetDisplayDeviceInfo(IN OUT LPDIRECT3D9_INT pDirect3D9)
+{
+    DISPLAY_DEVICEA DisplayDevice;
+    DWORD AdapterIndex;
+    DWORD Planes;
+    DWORD Bpp;
+    HDC hDC;
+
+    memset(&DisplayDevice, 0, sizeof(DISPLAY_DEVICEA));
+    DisplayDevice.cb = sizeof(DISPLAY_DEVICEA);   
+
+    pDirect3D9->dwNumDisplayAdapters = 0;
+    D3D9_PrimaryDeviceName[0] = '\0';
+
+    AdapterIndex = 0;
+    while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) == TRUE)
+    {
+        if ((DisplayDevice.StateFlags & (DISPLAY_DEVICE_DISCONNECT | DISPLAY_DEVICE_MIRRORING_DRIVER)) == 0 &&
+            (DisplayDevice.StateFlags & (DISPLAY_DEVICE_PRIMARY_DEVICE | DISPLAY_DEVICE_ATTACHED_TO_DESKTOP)) != 0)
+        {
+            memcpy(&pDirect3D9->DisplayAdapters[0].DisplayGuid, &DISPLAY_GUID, sizeof(GUID));
+
+            lstrcpynA(pDirect3D9->DisplayAdapters[0].szDeviceName, DisplayDevice.DeviceName, MAX_PATH);
+
+            if (pDirect3D9->dwNumDisplayAdapters == 0)
+                lstrcpynA(D3D9_PrimaryDeviceName, DisplayDevice.DeviceName, sizeof(D3D9_PrimaryDeviceName));
+
+            pDirect3D9->DisplayAdapters[0].dwStateFlags = DisplayDevice.StateFlags;
+            pDirect3D9->DisplayAdapters[0].bInUseFlag = TRUE;
+
+            ++pDirect3D9->dwNumDisplayAdapters;
+        }
+    }
+
+    AdapterIndex = 0;
+    while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) == TRUE)
+    {
+        if ((DisplayDevice.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0 &&
+            (DisplayDevice.StateFlags & (DISPLAY_DEVICE_MIRRORING_DRIVER | DISPLAY_DEVICE_PRIMARY_DEVICE)) == 0)
+        {
+            memcpy(&pDirect3D9->DisplayAdapters[pDirect3D9->dwNumDisplayAdapters].DisplayGuid, &DISPLAY_GUID, sizeof(GUID));
+
+            lstrcpynA(pDirect3D9->DisplayAdapters[pDirect3D9->dwNumDisplayAdapters].szDeviceName, DisplayDevice.DeviceName, MAX_PATH);
+
+            pDirect3D9->DisplayAdapters[pDirect3D9->dwNumDisplayAdapters].dwStateFlags = DisplayDevice.StateFlags;
+            pDirect3D9->DisplayAdapters[pDirect3D9->dwNumDisplayAdapters].bInUseFlag = TRUE;
+
+            ++pDirect3D9->dwNumDisplayAdapters;
+        }
+    }
+
+    hDC = GetDC(NULL);
+    Planes = GetDeviceCaps(hDC, PLANES);
+    Bpp = GetDeviceCaps(hDC, BITSPIXEL);
+    ReleaseDC(NULL, hDC);
+
+    if (Planes * Bpp < 8)
+        return FALSE;
+
+    return TRUE;
+}
+
 HRESULT CreateD3D9(OUT LPDIRECT3D9 *ppDirect3D9)
 {
     LPDIRECT3D9_INT pDirect3D9;
@@ -80,7 +144,7 @@ HRESULT CreateD3D9(OUT LPDIRECT3D9 *ppDirect3D9)
     pDirect3D9->lpInt = 0;
 
     pDirect3D9->lpVtbl = &Direct3D9_Vtbl;
-    pDirect3D9->dwProcessId = GetCurrentThreadId();
+    //pDirect3D9->dwProcessId = GetCurrentThreadId();
     pDirect3D9->dwRefCnt = 1;
 
     pDirect3D9->unknown004576 = 0;
@@ -95,9 +159,10 @@ HRESULT CreateD3D9(OUT LPDIRECT3D9 *ppDirect3D9)
     pDirect3D9->lpInt = pDirect3D9;
     pDirect3D9->unknown000007 = 1;
 
-    InitializeCriticalSection(&pDirect3D9->d3d9_cs);
+    //InitializeCriticalSection(&pDirect3D9->d3d9_cs);
 
-    memcpy(&pDirect3D9->DisplayGuid, &DISPLAY_GUID, sizeof(GUID));
+    //memset(pDirect3D9->DisplayAdapters, 0, sizeof(pDirect3D9->DisplayAdapters));
+    GetDisplayDeviceInfo(pDirect3D9);
 
     *ppDirect3D9 = (LPDIRECT3D9)&pDirect3D9->lpVtbl;
 
index 19135b6..2ae86a8 100644 (file)
@@ -19,6 +19,118 @@ typedef IDirect3D9* (WINAPI *LPDIRECT3DCREATE9)(UINT);
 
 extern const IDirect3D9Vtbl Direct3D9_Vtbl;
 
+typedef struct _tagDIRECT3D9DisplayAdapterInfo_
+{
+/* 0x0000 */    GUID DisplayGuid;
+/* 0x0010 */    CHAR szDeviceName[MAX_PATH];
+/* 0x0114 */    DWORD dwStateFlags;
+/* 0x0118 */    BOOL bInUseFlag;
+/* 0x011c */    DWORD unknown000002;
+/* 0x0120 */    DWORD unknown000003;
+/* 0x0124 */    DWORD unknown000004;    /* 0x00000001 */
+/* 0x0128 */    DWORD unknown000005;
+/* 0x012c */    DWORD unknown000006;
+/* 0x0130 */    DWORD unknown000007;
+/* 0x0134 */    DWORD unknown000008;
+/* 0x0138 */    DWORD unknown000009;
+/* 0x013c */    DWORD unknown000010;
+/* 0x0140 */    DWORD unknown000011;
+/* 0x0144 */    DWORD unknown000012;
+/* 0x0148 */    DWORD unknown000013;
+/* 0x014c */    DWORD unknown000014;
+/* 0x0150 */    DWORD unknown000015;
+/* 0x0154 */    DWORD unknown000016;
+/* 0x0158 */    DWORD unknown000017;
+/* 0x015c */    DWORD unknown000018;
+/* 0x0160 */    DWORD unknown000019;
+/* 0x0164 */    DWORD unknown000020;
+/* 0x0168 */    DWORD unknown000021;
+/* 0x016c */    DWORD unknown000022;
+/* 0x0170 */    DWORD unknown000023;
+/* 0x0174 */    DWORD unknown000024;
+/* 0x0178 */    DWORD unknown000025;
+/* 0x017c */    DWORD unknown000026;
+/* 0x0180 */    DWORD unknown000027;
+/* 0x0184 */    DWORD unknown000028;
+/* 0x0188 */    DWORD unknown000029;
+/* 0x018c */    DWORD unknown000030;
+/* 0x0190 */    DWORD unknown000031;
+/* 0x0194 */    DWORD unknown000032;
+/* 0x0198 */    DWORD unknown000033;
+/* 0x019c */    DWORD unknown000034;
+/* 0x01a0 */    DWORD unknown000035;
+/* 0x01a4 */    DWORD unknown000036;
+/* 0x01a8 */    DWORD unknown000037;
+/* 0x01ac */    DWORD unknown000038;
+/* 0x01b0 */    DWORD unknown000039;
+/* 0x01b4 */    DWORD unknown000040;
+/* 0x01b8 */    DWORD unknown000041;
+/* 0x01bc */    DWORD unknown000042;
+/* 0x01c0 */    DWORD unknown000043;
+/* 0x01c4 */    DWORD unknown000044;
+/* 0x01c8 */    DWORD unknown000045;
+/* 0x01cc */    DWORD unknown000046;
+/* 0x01d0 */    DWORD unknown000047;
+/* 0x01d4 */    DWORD unknown000048;
+/* 0x01d8 */    DWORD unknown000049;
+/* 0x01dc */    DWORD unknown000050;
+/* 0x01e0 */    DWORD unknown000051;
+/* 0x01e4 */    DWORD unknown000052;
+/* 0x01e8 */    DWORD unknown000053;
+/* 0x01ec */    DWORD unknown000054;
+/* 0x01f0 */    DWORD unknown000055;
+/* 0x01f4 */    DWORD unknown000056;
+/* 0x01f8 */    DWORD unknown000057;
+/* 0x01fc */    DWORD unknown000058;
+/* 0x0200 */    DWORD unknown000059;
+/* 0x0204 */    DWORD unknown000060;
+/* 0x0208 */    DWORD unknown000061;
+/* 0x020c */    DWORD unknown000062;
+/* 0x0210 */    DWORD unknown000063;
+/* 0x0214 */    DWORD unknown000064;
+/* 0x0218 */    DWORD unknown000065;
+/* 0x021c */    DWORD unknown000066;
+/* 0x0220 */    DWORD unknown000067;
+/* 0x0224 */    DWORD unknown000068;
+/* 0x0228 */    DWORD unknown000069;
+/* 0x022c */    DWORD unknown000070;
+/* 0x0230 */    DWORD unknown000071;
+/* 0x0234 */    DWORD unknown000072;
+/* 0x0238 */    DWORD unknown000073;
+/* 0x023c */    DWORD unknown000074;
+/* 0x0240 */    DWORD unknown000075;
+/* 0x0244 */    DWORD unknown000076;
+/* 0x0248 */    DWORD unknown000077;
+/* 0x024c */    DWORD unknown000078;
+/* 0x0250 */    DWORD unknown000079;
+/* 0x0254 */    DWORD unknown000080;
+/* 0x0258 */    DWORD unknown000081;
+/* 0x025c */    DWORD unknown000082;
+/* 0x0260 */    DWORD unknown000083;
+/* 0x0264 */    DWORD unknown000084;
+/* 0x0268 */    DWORD unknown000085;
+/* 0x026c */    DWORD dwDisplayWidth; /* Current display res */
+/* 0x0270 */    DWORD dwDisplayHeight; /* Current display res */
+/* 0x0274 */    DWORD unknown000088;
+/* 0x0278 */    DWORD unknown000089;
+/* 0x027c */    DWORD unknown000090;
+/* 0x0280 */    DWORD unknown000091;
+/* 0x0284 */    DWORD unknown000092;
+/* 0x0288 */    DWORD unknown000093;
+/* 0x028c */    DWORD unknown000094;
+/* 0x0290 */    DWORD unknown000095;
+/* 0x0294 */    DWORD unknown000096;
+/* 0x0298 */    DWORD unknown000097;
+/* 0x029c */    DWORD unknown000098;
+/* 0x02a0 */    DWORD unknown000099;
+/* 0x02a4 */    DWORD unknown000100;
+/* 0x02a8 */    DWORD unknown000101;    /*? 0xf7627000 */
+/* 0x02ac */    DWORD unknown000102;    /*? 0x00000002 */
+/* 0x02b0 */    DWORD unknown000103;    /*? 0x001552A0 */
+/* 0x02b4 */    DWORD unknown000104;
+/* 0x02b8 */    DWORD unknown000105;
+} Direct3D9DisplayAdapterInfo_INT;
+
 typedef struct _tagDIRECT3D9_INT_
 {
 /* 0x0000 */    const IDirect3D9Vtbl *lpVtbl; /* LPDIRECTD3D9 functoions table */
@@ -27,465 +139,8 @@ typedef struct _tagDIRECT3D9_INT_
 /* 0x0020 */    DWORD dwProcessId;
 /* 0x0024 */    struct _tagDIRECT3D9_INT_ *lpInt;
 /* 0x0028 */    LONG dwRefCnt;          /* Increases and decreases by AddRef() and Release() */
-/* 0x002c */    DWORD unknown000011;    /* 0x00000001 - Probably NumDisplays */
-/* 0x0030 */    GUID DisplayGuid;       /*? Always {67685559-3106-11D0-B971-00AA00342F9F} ? */
-/* 0x0040 */    CHAR DeviceName[MAX_PATH];
-/* 0x0144 */    DWORD StateFlags;       /*? 0x80000001 */
-/* 0x0148 */    DWORD unknown000082;    /*? 0x00000001 */
-/* 0x014c */    DWORD unknown000083;
-/* 0x0150 */    DWORD unknown000084;
-/* 0x0154 */    DWORD unknown000085;    /* 0x00000001 */
-/* 0x0158 */    DWORD unknown000086;
-/* 0x015c */    DWORD unknown000087;
-/* 0x0160 */    DWORD unknown000088;
-/* 0x0164 */    DWORD unknown000089;
-/* 0x0168 */    DWORD unknown000090;
-/* 0x016c */    DWORD unknown000091;
-/* 0x0170 */    DWORD unknown000092;
-/* 0x0174 */    DWORD unknown000093;
-/* 0x0178 */    DWORD unknown000094;
-/* 0x017c */    DWORD unknown000095;
-/* 0x0180 */    DWORD unknown000096;
-/* 0x0184 */    DWORD unknown000097;
-/* 0x0188 */    DWORD unknown000098;
-/* 0x018c */    DWORD unknown000099;
-/* 0x0190 */    DWORD unknown000100;
-/* 0x0194 */    DWORD unknown000101;
-/* 0x0198 */    DWORD unknown000102;
-/* 0x019c */    DWORD unknown000103;
-/* 0x01a0 */    DWORD unknown000104;
-/* 0x01a4 */    DWORD unknown000105;
-/* 0x01a8 */    DWORD unknown000106;
-/* 0x01ac */    DWORD unknown000107;
-/* 0x01b0 */    DWORD unknown000108;
-/* 0x01b4 */    DWORD unknown000109;
-/* 0x01b8 */    DWORD unknown000110;
-/* 0x01bc */    DWORD unknown000111;
-/* 0x01c0 */    DWORD unknown000112;
-/* 0x01c4 */    DWORD unknown000113;
-/* 0x01c8 */    DWORD unknown000114;
-/* 0x01cc */    DWORD unknown000115;
-/* 0x01d0 */    DWORD unknown000116;
-/* 0x01d4 */    DWORD unknown000117;
-/* 0x01d8 */    DWORD unknown000118;
-/* 0x01dc */    DWORD unknown000119;
-/* 0x01e0 */    DWORD unknown000120;
-/* 0x01e4 */    DWORD unknown000121;
-/* 0x01e8 */    DWORD unknown000122;
-/* 0x01ec */    DWORD unknown000123;
-/* 0x01f0 */    DWORD unknown000124;
-/* 0x01f4 */    DWORD unknown000125;
-/* 0x01f8 */    DWORD unknown000126;
-/* 0x01fc */    DWORD unknown000127;
-/* 0x0200 */    DWORD unknown000128;
-/* 0x0204 */    DWORD unknown000129;
-/* 0x0208 */    DWORD unknown000130;
-/* 0x020c */    DWORD unknown000131;
-/* 0x0210 */    DWORD unknown000132;
-/* 0x0214 */    DWORD unknown000133;
-/* 0x0218 */    DWORD unknown000134;
-/* 0x021c */    DWORD unknown000135;
-/* 0x0220 */    DWORD unknown000136;
-/* 0x0224 */    DWORD unknown000137;
-/* 0x0228 */    DWORD unknown000138;
-/* 0x022c */    DWORD unknown000139;
-/* 0x0230 */    DWORD unknown000140;
-/* 0x0234 */    DWORD unknown000141;
-/* 0x0238 */    DWORD unknown000142;
-/* 0x023c */    DWORD unknown000143;
-/* 0x0240 */    DWORD unknown000144;
-/* 0x0244 */    DWORD unknown000145;
-/* 0x0248 */    DWORD unknown000146;
-/* 0x024c */    DWORD unknown000147;
-/* 0x0250 */    DWORD unknown000148;
-/* 0x0254 */    DWORD unknown000149;
-/* 0x0258 */    DWORD unknown000150;
-/* 0x025c */    DWORD unknown000151;
-/* 0x0260 */    DWORD unknown000152;
-/* 0x0264 */    DWORD unknown000153;
-/* 0x0268 */    DWORD unknown000154;
-/* 0x026c */    DWORD unknown000155;
-/* 0x0270 */    DWORD unknown000156;
-/* 0x0274 */    DWORD unknown000157;
-/* 0x0278 */    DWORD unknown000158;
-/* 0x027c */    DWORD unknown000159;
-/* 0x0280 */    DWORD unknown000160;
-/* 0x0284 */    DWORD unknown000161;
-/* 0x0288 */    DWORD unknown000162;
-/* 0x028c */    DWORD unknown000163;
-/* 0x0290 */    DWORD unknown000164;
-/* 0x0294 */    DWORD unknown000165;
-/* 0x0298 */    DWORD unknown000166;
-/* 0x029c */    DWORD dwDisplayWidth; /* Current display res */
-/* 0x02a0 */    DWORD dwDisplayHeight; /* Current display res */
-/* 0x02a4 */    DWORD unknown000169;
-/* 0x02a8 */    DWORD unknown000170;
-/* 0x02ac */    DWORD unknown000171;
-/* 0x02b0 */    DWORD unknown000172;
-/* 0x02b4 */    DWORD unknown000173;
-/* 0x02b8 */    DWORD unknown000174;
-/* 0x02bc */    DWORD unknown000175;
-/* 0x02c0 */    DWORD unknown000176;
-/* 0x02c4 */    DWORD unknown000177;
-/* 0x02c8 */    DWORD unknown000178;
-/* 0x02cc */    DWORD unknown000179;
-/* 0x02d0 */    DWORD unknown000180;
-/* 0x02d4 */    DWORD unknown000181;
-/* 0x02d8 */    DWORD unknown000182;    /*? 0xf7627000 */
-/* 0x02dc */    DWORD unknown000183;    /*? 0x00000002 */
-/* 0x02e0 */    DWORD unknown000184;    /*? 0x001552A0 */
-/* 0x02e4 */    DWORD unknown000185;
-/* 0x02e8 */    DWORD unknown000186;
-/* 0x02ec */    DWORD unknown000187;
-/* 0x02f0 */    DWORD unknown000188;
-/* 0x02f4 */    DWORD unknown000189;
-/* 0x02f8 */    DWORD unknown000190;
-/* 0x02fc */    DWORD unknown000191;
-/* 0x0300 */    DWORD unknown000192;
-/* 0x0304 */    DWORD unknown000193;
-/* 0x0308 */    DWORD unknown000194;
-/* 0x030c */    DWORD unknown000195;
-/* 0x0310 */    DWORD unknown000196;
-/* 0x0314 */    DWORD unknown000197;
-/* 0x0318 */    DWORD unknown000198;
-/* 0x031c */    DWORD unknown000199;
-/* 0x0320 */    DWORD unknown000200;
-/* 0x0324 */    DWORD unknown000201;
-/* 0x0328 */    DWORD unknown000202;
-/* 0x032c */    DWORD unknown000203;
-/* 0x0330 */    DWORD unknown000204;
-/* 0x0334 */    DWORD unknown000205;
-/* 0x0338 */    DWORD unknown000206;
-/* 0x033c */    DWORD unknown000207;
-/* 0x0340 */    DWORD unknown000208;
-/* 0x0344 */    DWORD unknown000209;
-/* 0x0348 */    DWORD unknown000210;
-/* 0x034c */    DWORD unknown000211;
-/* 0x0350 */    DWORD unknown000212;
-/* 0x0354 */    DWORD unknown000213;
-/* 0x0358 */    DWORD unknown000214;
-/* 0x035c */    DWORD unknown000215;
-/* 0x0360 */    DWORD unknown000216;
-/* 0x0364 */    DWORD unknown000217;
-/* 0x0368 */    DWORD unknown000218;
-/* 0x036c */    DWORD unknown000219;
-/* 0x0370 */    DWORD unknown000220;
-/* 0x0374 */    DWORD unknown000221;
-/* 0x0378 */    DWORD unknown000222;
-/* 0x037c */    DWORD unknown000223;
-/* 0x0380 */    DWORD unknown000224;
-/* 0x0384 */    DWORD unknown000225;
-/* 0x0388 */    DWORD unknown000226;
-/* 0x038c */    DWORD unknown000227;
-/* 0x0390 */    DWORD unknown000228;
-/* 0x0394 */    DWORD unknown000229;
-/* 0x0398 */    DWORD unknown000230;
-/* 0x039c */    DWORD unknown000231;
-/* 0x03a0 */    DWORD unknown000232;
-/* 0x03a4 */    DWORD unknown000233;
-/* 0x03a8 */    DWORD unknown000234;
-/* 0x03ac */    DWORD unknown000235;
-/* 0x03b0 */    DWORD unknown000236;
-/* 0x03b4 */    DWORD unknown000237;
-/* 0x03b8 */    DWORD unknown000238;
-/* 0x03bc */    DWORD unknown000239;
-/* 0x03c0 */    DWORD unknown000240;
-/* 0x03c4 */    DWORD unknown000241;
-/* 0x03c8 */    DWORD unknown000242;
-/* 0x03cc */    DWORD unknown000243;
-/* 0x03d0 */    DWORD unknown000244;
-/* 0x03d4 */    DWORD unknown000245;
-/* 0x03d8 */    DWORD unknown000246;
-/* 0x03dc */    DWORD unknown000247;
-/* 0x03e0 */    DWORD unknown000248;
-/* 0x03e4 */    DWORD unknown000249;
-/* 0x03e8 */    DWORD unknown000250;
-/* 0x03ec */    DWORD unknown000251;
-/* 0x03f0 */    DWORD unknown000252;
-/* 0x03f4 */    DWORD unknown000253;
-/* 0x03f8 */    DWORD unknown000254;
-/* 0x03fc */    DWORD unknown000255;
-/* 0x0400 */    DWORD unknown000256;
-/* 0x0404 */    DWORD unknown000257;
-/* 0x0408 */    DWORD unknown000258;
-/* 0x040c */    DWORD unknown000259;
-/* 0x0410 */    DWORD unknown000260;
-/* 0x0414 */    DWORD unknown000261;
-/* 0x0418 */    DWORD unknown000262;
-/* 0x041c */    DWORD unknown000263;
-/* 0x0420 */    DWORD unknown000264;
-/* 0x0424 */    DWORD unknown000265;
-/* 0x0428 */    DWORD unknown000266;
-/* 0x042c */    DWORD unknown000267;
-/* 0x0430 */    DWORD unknown000268;
-/* 0x0434 */    DWORD unknown000269;
-/* 0x0438 */    DWORD unknown000270;
-/* 0x043c */    DWORD unknown000271;
-/* 0x0440 */    DWORD unknown000272;
-/* 0x0444 */    DWORD unknown000273;
-/* 0x0448 */    DWORD unknown000274;
-/* 0x044c */    DWORD unknown000275;
-/* 0x0450 */    DWORD unknown000276;
-/* 0x0454 */    DWORD unknown000277;
-/* 0x0458 */    DWORD unknown000278;
-/* 0x045c */    DWORD unknown000279;
-/* 0x0460 */    DWORD unknown000280;
-/* 0x0464 */    DWORD unknown000281;
-/* 0x0468 */    DWORD unknown000282;
-/* 0x046c */    DWORD unknown000283;
-/* 0x0470 */    DWORD unknown000284;
-/* 0x0474 */    DWORD unknown000285;
-/* 0x0478 */    DWORD unknown000286;
-/* 0x047c */    DWORD unknown000287;
-/* 0x0480 */    DWORD unknown000288;
-/* 0x0484 */    DWORD unknown000289;
-/* 0x0488 */    DWORD unknown000290;
-/* 0x048c */    DWORD unknown000291;
-/* 0x0490 */    DWORD unknown000292;
-/* 0x0494 */    DWORD unknown000293;
-/* 0x0498 */    DWORD unknown000294;
-/* 0x049c */    DWORD unknown000295;
-/* 0x04a0 */    DWORD unknown000296;
-/* 0x04a4 */    DWORD unknown000297;
-/* 0x04a8 */    DWORD unknown000298;
-/* 0x04ac */    DWORD unknown000299;
-/* 0x04b0 */    DWORD unknown000300;
-/* 0x04b4 */    DWORD unknown000301;
-/* 0x04b8 */    DWORD unknown000302;
-/* 0x04bc */    DWORD unknown000303;
-/* 0x04c0 */    DWORD unknown000304;
-/* 0x04c4 */    DWORD unknown000305;
-/* 0x04c8 */    DWORD unknown000306;
-/* 0x04cc */    DWORD unknown000307;
-/* 0x04d0 */    DWORD unknown000308;
-/* 0x04d4 */    DWORD unknown000309;
-/* 0x04d8 */    DWORD unknown000310;
-/* 0x04dc */    DWORD unknown000311;
-/* 0x04e0 */    DWORD unknown000312;
-/* 0x04e4 */    DWORD unknown000313;
-/* 0x04e8 */    DWORD unknown000314;
-/* 0x04ec */    DWORD unknown000315;
-/* 0x04f0 */    DWORD unknown000316;
-/* 0x04f4 */    DWORD unknown000317;
-/* 0x04f8 */    DWORD unknown000318;
-/* 0x04fc */    DWORD unknown000319;
-/* 0x0500 */    DWORD unknown000320;
-/* 0x0504 */    DWORD unknown000321;
-/* 0x0508 */    DWORD unknown000322;
-/* 0x050c */    DWORD unknown000323;
-/* 0x0510 */    DWORD unknown000324;
-/* 0x0514 */    DWORD unknown000325;
-/* 0x0518 */    DWORD unknown000326;
-/* 0x051c */    DWORD unknown000327;
-/* 0x0520 */    DWORD unknown000328;
-/* 0x0524 */    DWORD unknown000329;
-/* 0x0528 */    DWORD unknown000330;
-/* 0x052c */    DWORD unknown000331;
-/* 0x0530 */    DWORD unknown000332;
-/* 0x0534 */    DWORD unknown000333;
-/* 0x0538 */    DWORD unknown000334;
-/* 0x053c */    DWORD unknown000335;
-/* 0x0540 */    DWORD unknown000336;
-/* 0x0544 */    DWORD unknown000337;
-/* 0x0548 */    DWORD unknown000338;
-/* 0x054c */    DWORD unknown000339;
-/* 0x0550 */    DWORD unknown000340;
-/* 0x0554 */    DWORD unknown000341;
-/* 0x0558 */    DWORD unknown000342;
-/* 0x055c */    DWORD unknown000343;
-/* 0x0560 */    DWORD unknown000344;
-/* 0x0564 */    DWORD unknown000345;
-/* 0x0568 */    DWORD unknown000346;
-/* 0x056c */    DWORD unknown000347;
-/* 0x0570 */    DWORD unknown000348;
-/* 0x0574 */    DWORD unknown000349;
-/* 0x0578 */    DWORD unknown000350;
-/* 0x057c */    DWORD unknown000351;
-/* 0x0580 */    DWORD unknown000352;
-/* 0x0584 */    DWORD unknown000353;
-/* 0x0588 */    DWORD unknown000354;
-/* 0x058c */    DWORD unknown000355;
-/* 0x0590 */    DWORD unknown000356;
-/* 0x0594 */    DWORD unknown000357;
-/* 0x0598 */    DWORD unknown000358;
-/* 0x059c */    DWORD unknown000359;
-/* 0x05a0 */    DWORD unknown000360;
-/* 0x05a4 */    DWORD unknown000361;
-/* 0x05a8 */    DWORD unknown000362;
-/* 0x05ac */    DWORD unknown000363;
-/* 0x05b0 */    DWORD unknown000364;
-/* 0x05b4 */    DWORD unknown000365;
-/* 0x05b8 */    DWORD unknown000366;
-/* 0x05bc */    DWORD unknown000367;
-/* 0x05c0 */    DWORD unknown000368;
-/* 0x05c4 */    DWORD unknown000369;
-/* 0x05c8 */    DWORD unknown000370;
-/* 0x05cc */    DWORD unknown000371;
-/* 0x05d0 */    DWORD unknown000372;
-/* 0x05d4 */    DWORD unknown000373;
-/* 0x05d8 */    DWORD unknown000374;
-/* 0x05dc */    DWORD unknown000375;
-/* 0x05e0 */    DWORD unknown000376;
-/* 0x05e4 */    DWORD unknown000377;
-/* 0x05e8 */    DWORD unknown000378;
-/* 0x05ec */    DWORD unknown000379;
-/* 0x05f0 */    DWORD unknown000380;
-/* 0x05f4 */    DWORD unknown000381;
-/* 0x05f8 */    DWORD unknown000382;
-/* 0x05fc */    DWORD unknown000383;
-/* 0x0600 */    DWORD unknown000384;
-/* 0x0604 */    DWORD unknown000385;
-/* 0x0608 */    DWORD unknown000386;
-/* 0x060c */    DWORD unknown000387;
-/* 0x0610 */    DWORD unknown000388;
-/* 0x0614 */    DWORD unknown000389;
-/* 0x0618 */    DWORD unknown000390;
-/* 0x061c */    DWORD unknown000391;
-/* 0x0620 */    DWORD unknown000392;
-/* 0x0624 */    DWORD unknown000393;
-/* 0x0628 */    DWORD unknown000394;
-/* 0x062c */    DWORD unknown000395;
-/* 0x0630 */    DWORD unknown000396;
-/* 0x0634 */    DWORD unknown000397;
-/* 0x0638 */    DWORD unknown000398;
-/* 0x063c */    DWORD unknown000399;
-/* 0x0640 */    DWORD unknown000400;
-/* 0x0644 */    DWORD unknown000401;
-/* 0x0648 */    DWORD unknown000402;
-/* 0x064c */    DWORD unknown000403;
-/* 0x0650 */    DWORD unknown000404;
-/* 0x0654 */    DWORD unknown000405;
-/* 0x0658 */    DWORD unknown000406;
-/* 0x065c */    DWORD unknown000407;
-/* 0x0660 */    DWORD unknown000408;
-/* 0x0664 */    DWORD unknown000409;
-/* 0x0668 */    DWORD unknown000410;
-/* 0x066c */    DWORD unknown000411;
-/* 0x0670 */    DWORD unknown000412;
-/* 0x0674 */    DWORD unknown000413;
-/* 0x0678 */    DWORD unknown000414;
-/* 0x067c */    DWORD unknown000415;
-/* 0x0680 */    DWORD unknown000416;
-/* 0x0684 */    DWORD unknown000417;
-/* 0x0688 */    DWORD unknown000418;
-/* 0x068c */    DWORD unknown000419;
-/* 0x0690 */    DWORD unknown000420;
-/* 0x0694 */    DWORD unknown000421;
-/* 0x0698 */    DWORD unknown000422;
-/* 0x069c */    DWORD unknown000423;
-/* 0x06a0 */    DWORD unknown000424;
-/* 0x06a4 */    DWORD unknown000425;
-/* 0x06a8 */    DWORD unknown000426;
-/* 0x06ac */    DWORD unknown000427;
-/* 0x06b0 */    DWORD unknown000428;
-/* 0x06b4 */    DWORD unknown000429;
-/* 0x06b8 */    DWORD unknown000430;
-/* 0x06bc */    DWORD unknown000431;
-/* 0x06c0 */    DWORD unknown000432;
-/* 0x06c4 */    DWORD unknown000433;
-/* 0x06c8 */    DWORD unknown000434;
-/* 0x06cc */    DWORD unknown000435;
-/* 0x06d0 */    DWORD unknown000436;
-/* 0x06d4 */    DWORD unknown000437;
-/* 0x06d8 */    DWORD unknown000438;
-/* 0x06dc */    DWORD unknown000439;
-/* 0x06e0 */    DWORD unknown000440;
-/* 0x06e4 */    DWORD unknown000441;
-/* 0x06e8 */    DWORD unknown000442;
-/* 0x06ec */    DWORD unknown000443;
-/* 0x06f0 */    DWORD unknown000444;
-/* 0x06f4 */    DWORD unknown000445;
-/* 0x06f8 */    DWORD unknown000446;
-/* 0x06fc */    DWORD unknown000447;
-/* 0x0700 */    DWORD unknown000448;
-/* 0x0704 */    DWORD unknown000449;
-/* 0x0708 */    DWORD unknown000450;
-/* 0x070c */    DWORD unknown000451;
-/* 0x0710 */    DWORD unknown000452;
-/* 0x0714 */    DWORD unknown000453;
-/* 0x0718 */    DWORD unknown000454;
-/* 0x071c */    DWORD unknown000455;
-/* 0x0720 */    DWORD unknown000456;
-/* 0x0724 */    DWORD unknown000457;
-/* 0x0728 */    DWORD unknown000458;
-/* 0x072c */    DWORD unknown000459;
-/* 0x0730 */    DWORD unknown000460;
-/* 0x0734 */    DWORD unknown000461;
-/* 0x0738 */    DWORD unknown000462;
-/* 0x073c */    DWORD unknown000463;
-/* 0x0740 */    DWORD unknown000464;
-/* 0x0744 */    DWORD unknown000465;
-/* 0x0748 */    DWORD unknown000466;
-/* 0x074c */    DWORD unknown000467;
-/* 0x0750 */    DWORD unknown000468;
-/* 0x0754 */    DWORD unknown000469;
-/* 0x0758 */    DWORD unknown000470;
-/* 0x075c */    DWORD unknown000471;
-/* 0x0760 */    DWORD unknown000472;
-/* 0x0764 */    DWORD unknown000473;
-/* 0x0768 */    DWORD unknown000474;
-/* 0x076c */    DWORD unknown000475;
-/* 0x0770 */    DWORD unknown000476;
-/* 0x0774 */    DWORD unknown000477;
-/* 0x0778 */    DWORD unknown000478;
-/* 0x077c */    DWORD unknown000479;
-/* 0x0780 */    DWORD unknown000480;
-/* 0x0784 */    DWORD unknown000481;
-/* 0x0788 */    DWORD unknown000482;
-/* 0x078c */    DWORD unknown000483;
-/* 0x0790 */    DWORD unknown000484;
-/* 0x0794 */    DWORD unknown000485;
-/* 0x0798 */    DWORD unknown000486;
-/* 0x079c */    DWORD unknown000487;
-/* 0x07a0 */    DWORD unknown000488;
-/* 0x07a4 */    DWORD unknown000489;
-/* 0x07a8 */    DWORD unknown000490;
-/* 0x07ac */    DWORD unknown000491;
-/* 0x07b0 */    DWORD unknown000492;
-/* 0x07b4 */    DWORD unknown000493;
-/* 0x07b8 */    DWORD unknown000494;
-/* 0x07bc */    DWORD unknown000495;
-/* 0x07c0 */    DWORD unknown000496;
-/* 0x07c4 */    DWORD unknown000497;
-/* 0x07c8 */    DWORD unknown000498;
-/* 0x07cc */    DWORD unknown000499;
-/* 0x07d0 */    DWORD unknown000500;
-/* 0x07d4 */    DWORD unknown000501;
-/* 0x07d8 */    DWORD unknown000502;
-/* 0x07dc */    DWORD unknown000503;
-/* 0x07e0 */    DWORD unknown000504;
-/* 0x07e4 */    DWORD unknown000505;
-/* 0x07e8 */    DWORD unknown000506;
-/* 0x07ec */    DWORD unknown000507;
-/* 0x07f0 */    DWORD unknown000508;
-/* 0x07f4 */    DWORD unknown000509;
-/* 0x07f8 */    DWORD unknown000510;
-/* 0x07fc */    DWORD unknown000511;
-/* 0x0800 */    DWORD unknown000512;
-/* 0x0804 */    DWORD unknown000513;
-/* 0x0808 */    DWORD unknown000514;
-/* 0x080c */    DWORD unknown000515;
-/* 0x0810 */    DWORD unknown000516;
-/* 0x0814 */    DWORD unknown000517;
-/* 0x0818 */    DWORD unknown000518;
-/* 0x081c */    DWORD unknown000519;
-/* 0x0820 */    DWORD unknown000520;
-/* 0x0824 */    DWORD unknown000521;
-/* 0x0828 */    DWORD unknown000522;
-/* 0x082c */    DWORD unknown000523;
-/* 0x0830 */    DWORD unknown000524;
-/* 0x0834 */    DWORD unknown000525;
-/* 0x0838 */    DWORD unknown000526;
-/* 0x083c */    DWORD unknown000527;
-/* 0x0840 */    DWORD unknown000528;
-/* 0x0844 */    DWORD unknown000529;
-/* 0x0848 */    DWORD unknown000530;
-/* 0x084c */    DWORD unknown000531;
-/* 0x0850 */    DWORD unknown000532;
-/* 0x0854 */    DWORD unknown000533;
-/* 0x0858 */    DWORD unknown000534;
-/* 0x085c */    DWORD unknown000535;
-/* 0x0860 */    DWORD unknown000536;
+/* 0x002c */    DWORD dwNumDisplayAdapters;
+/* 0x0030 */    Direct3D9DisplayAdapterInfo_INT DisplayAdapters[3];
 /* 0x0864 */    DWORD unknown000537;
 /* 0x0868 */    DWORD unknown000538;
 /* 0x086c */    DWORD unknown000539;