Full some additional Structs
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
Modified: trunk/reactos/lib/ddraw/rosdraw.h

Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
--- trunk/reactos/lib/ddraw/hal/ddraw.c	2005-08-09 17:55:47 UTC (rev 17246)
+++ trunk/reactos/lib/ddraw/hal/ddraw.c	2005-08-09 19:11:57 UTC (rev 17247)
@@ -41,8 +41,9 @@
 		return DDERR_INVALIDPARAMS;
 
 	This->pD3dTextureFormats = HeapAlloc(GetProcessHeap(), 0, sizeof(DDSURFACEDESC) * This->D3dDriverData.dwNumTextureFormats);
-	This->pdwFourCC = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * This->HalInfo.ddCaps.dwNumFourCCCodes);
-	This->pvmList = HeapAlloc(GetProcessHeap(), 0, sizeof(VIDMEM) * This->HalInfo.vmiData.dwNumHeaps);
+	This->HalInfo.vmiData.pvmList = HeapAlloc(GetProcessHeap(), 0, sizeof(VIDMEM) * This->HalInfo.vmiData.dwNumHeaps);
+	This->DirectDrawGlobal.lpdwFourCC = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * This->HalInfo.ddCaps.dwNumFourCCCodes);
+	This->DirectDrawGlobal.lpZPixelFormats = HeapAlloc(GetProcessHeap(), 0, sizeof(DDPIXELFORMAT) * This->DirectDrawGlobal.dwNumZPixelFormats);
 
 	if(!DdQueryDirectDrawObject (
 		&This->DirectDrawGlobal, 
@@ -54,9 +55,19 @@
 		&This->D3dDriverData,
 		&This->DriverCallbacks.D3dBufferCallbacks, 
 		This->pD3dTextureFormats, 
-		This->pdwFourCC, 
-		This->pvmList ))
+		This->DirectDrawGlobal.lpdwFourCC, 
+		This->HalInfo.vmiData.pvmList ))
 		return DDERR_INVALIDPARAMS;
+		
+	This->DirectDrawGlobal.vmiData.dwDisplayWidth = This->Width;
+	This->DirectDrawGlobal.vmiData.dwDisplayHeight = This->Height;
+	This->DirectDrawGlobal.vmiData.lDisplayPitch =  This->Width * This->Bpp/8;
+	//This->DirectDrawGlobal.vmiData.ddpfDisplay; // This has to be filled
+	This->DirectDrawGlobal.vmiData.dwOffscreenAlign = 64;
+	This->DirectDrawGlobal.vmiData.dwOverlayAlign = 64;
+	This->DirectDrawGlobal.vmiData.dwTextureAlign = 64;
+	This->DirectDrawGlobal.vmiData.dwZBufferAlign = 64;
+	This->DirectDrawGlobal.vmiData.dwAlphaAlign = 64;
 
 	return DD_OK;
 }
@@ -74,8 +85,8 @@
 			
 	if(This->pD3dTextureFormats)
 		HeapFree(GetProcessHeap(), 0, This->pD3dTextureFormats);
-	if(This->pdwFourCC)
-		HeapFree(GetProcessHeap(), 0, This->pdwFourCC);
-	if(This->pvmList)
-		HeapFree(GetProcessHeap(), 0, This->pvmList);
+	if(This->DirectDrawGlobal.lpdwFourCC)
+		HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpdwFourCC);
+	if(This->HalInfo.vmiData.pvmList)
+		HeapFree(GetProcessHeap(), 0, This->HalInfo.vmiData.pvmList);
 }

Modified: trunk/reactos/lib/ddraw/rosdraw.h
--- trunk/reactos/lib/ddraw/rosdraw.h	2005-08-09 17:55:47 UTC (rev 17246)
+++ trunk/reactos/lib/ddraw/rosdraw.h	2005-08-09 19:11:57 UTC (rev 17247)
@@ -34,10 +34,7 @@
 
 	DDHALINFO HalInfo;	
     D3DHAL_GLOBALDRIVERDATA	D3dDriverData;
-
 	LPDDSURFACEDESC pD3dTextureFormats;
-	LPDWORD pdwFourCC;
-	LPVIDMEM pvmList;
 
     HWND window;
     DWORD cooperative_level;