But we still does not doing the whole startup process right.
svn path=/trunk/; revision=18862
windows nt, it is in use for all os, and it always pont to
DirectDrawGlobal.hDD */
windows nt, it is in use for all os, and it always pont to
DirectDrawGlobal.hDD */
+ /* FIXME add all callback that have been commect out to gpl */
+ /* FIXME free the memmor that being alloc when ddraw.dll exists */
+ /* FIXME add check for DriverInfo if the handle or not */
+
DDHAL_GETDRIVERINFODATA DriverInfo;
memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA));
DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA);
DDHAL_GETDRIVERINFODATA DriverInfo;
memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA));
DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA);
DDHAL_DDMISCELLANEOUSCALLBACKS misc;
DriverInfo.guidInfo = GUID_D3DCallbacks;
DriverInfo.lpvData = &misc;
DDHAL_DDMISCELLANEOUSCALLBACKS misc;
DriverInfo.guidInfo = GUID_D3DCallbacks;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.dwExpectedSize = sizeof();
This->HalInfo.GetDriverInfo( &DriverInfo);*/
/* Get the D3DCallbacks2 */
This->HalInfo.GetDriverInfo( &DriverInfo);*/
/* Get the D3DCallbacks2 */
/* Problem with include files
DriverInfo.guidInfo = GUID_D3DCaps;
DriverInfo.lpvData = &misc;
/* Problem with include files
DriverInfo.guidInfo = GUID_D3DCaps;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.dwExpectedSize = sizeof();
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
/* Get the D3DParseUnknownCommandCallback */
/* Get the D3DParseUnknownCommandCallback */
+ /* D3dDrawPrimitives2 callback where should it be fill in
DriverInfo.guidInfo = GUID_D3DParseUnknownCommandCallback;
DriverInfo.lpvData = &misc;
DriverInfo.guidInfo = GUID_D3DParseUnknownCommandCallback;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
- This->HalInfo.GetDriverInfo( &DriverInfo);
+ DriverInfo.dwExpectedSize = sizeof();
+ This->HalInfo.GetDriverInfo( &DriverInfo);
- /* Get the GetHeapAlignment */
- /*
+ /* Get the GetHeapAlignment */
+ /* where should it be fill in
DriverInfo.guidInfo = GUID_GetHeapAlignment;
DriverInfo.lpvData = &misc;
DriverInfo.guidInfo = GUID_GetHeapAlignment;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.dwExpectedSize = sizeof();
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
/* Get the KernelCallbacks */
DriverInfo.guidInfo = GUID_KernelCallbacks;
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDKernel;
/* Get the KernelCallbacks */
DriverInfo.guidInfo = GUID_KernelCallbacks;
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDKernel;
/* Get the Miscellaneous2Callbacks */
/* Get the Miscellaneous2Callbacks */
+ /* Not in the DDRAWI_DIRECTDRAW_GBL we map it up as private
+ Contain CreatesurfaceEx and other nice callbacks */
DriverInfo.guidInfo = GUID_Miscellaneous2Callbacks;
DriverInfo.guidInfo = GUID_Miscellaneous2Callbacks;
- DriverInfo.lpvData = &misc;
+ DriverInfo.lpvData = &This->Misc2Callback;
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
This->HalInfo.GetDriverInfo( &DriverInfo);
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
This->HalInfo.GetDriverInfo( &DriverInfo);
/* Get the MotionCompCallbacks */
DriverInfo.guidInfo = GUID_MotionCompCallbacks;
/* Get the MotionCompCallbacks */
DriverInfo.guidInfo = GUID_MotionCompCallbacks;
/* Get the NonLocalVidMemCaps */
/* Get the NonLocalVidMemCaps */
+ This->DirectDrawGlobal.lpddNLVCaps = (LPDDNONLOCALVIDMEMCAPS)HeapAlloc(GetProcessHeap(), 0, sizeof(DDNONLOCALVIDMEMCAPS));
DriverInfo.guidInfo = GUID_NonLocalVidMemCaps;
DriverInfo.guidInfo = GUID_NonLocalVidMemCaps;
- DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpddNLVCaps;
+ DriverInfo.dwExpectedSize = sizeof(DDNONLOCALVIDMEMCAPS);
This->HalInfo.GetDriverInfo( &DriverInfo);
This->HalInfo.GetDriverInfo( &DriverInfo);
/* Get the NTCallbacks */
/* Get the NTCallbacks */
DriverInfo.guidInfo = GUID_NTCallbacks;
DriverInfo.lpvData = &misc;
DriverInfo.guidInfo = GUID_NTCallbacks;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.dwExpectedSize = sizeof();
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
/* Get the NTPrivateDriverCaps */
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
/* Get the NTPrivateDriverCaps */
DriverInfo.guidInfo = GUID_NTPrivateDriverCaps;
DriverInfo.lpvData = &misc;
DriverInfo.guidInfo = GUID_NTPrivateDriverCaps;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.dwExpectedSize = sizeof();
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
/* Get the UpdateNonLocalHeap */
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
/* Get the UpdateNonLocalHeap */
DriverInfo.guidInfo = GUID_UpdateNonLocalHeap;
DriverInfo.lpvData = &misc;
DriverInfo.guidInfo = GUID_UpdateNonLocalHeap;
DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.dwExpectedSize = sizeof();
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
- /* Get the VideoPortCallbacks */
- /* Problem with include files
+ /* Get the VideoPortCallbacks */
DriverInfo.guidInfo = GUID_VideoPortCallbacks;
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDVideoPort;
DriverInfo.guidInfo = GUID_VideoPortCallbacks;
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDVideoPort;
- DriverInfo.dwExpectedSize = sizeof(HALDDVideoPort);
+ DriverInfo.dwExpectedSize = sizeof(DDHAL_DDVIDEOPORTCALLBACKS);
This->HalInfo.GetDriverInfo( &DriverInfo);
This->HalInfo.GetDriverInfo( &DriverInfo);
/* Get the VideoPortCaps */
/* Get the VideoPortCaps */
+ This->DirectDrawGlobal.lpDDVideoPortCaps = (LPDDVIDEOPORTCAPS)HeapAlloc(GetProcessHeap(), 0, sizeof(DDVIDEOPORTCAPS));
DriverInfo.guidInfo = GUID_VideoPortCaps;
DriverInfo.guidInfo = GUID_VideoPortCaps;
- DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpDDVideoPortCaps;
+ DriverInfo.dwExpectedSize = sizeof(DDVIDEOPORTCAPS);
This->HalInfo.GetDriverInfo( &DriverInfo);
This->HalInfo.GetDriverInfo( &DriverInfo);
/* Get the ZPixelFormats */
/* Get the ZPixelFormats */
+ This->DirectDrawGlobal.lpZPixelFormats = (LPDDPIXELFORMAT)HeapAlloc(GetProcessHeap(), 0, sizeof(DDPIXELFORMAT));
DriverInfo.guidInfo = GUID_ZPixelFormats;
DriverInfo.guidInfo = GUID_ZPixelFormats;
- DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpZPixelFormats;
+ DriverInfo.dwExpectedSize = sizeof(DDPIXELFORMAT);
This->HalInfo.GetDriverInfo( &DriverInfo);
This->HalInfo.GetDriverInfo( &DriverInfo);
- /* FIXME add setup for one call ot get memmory */
+
+ /* Setup some info from the callbacks we got */
+
+ /* FIXME do more callbacks and fill the gpl struct */
+
+ DDHAL_GETAVAILDRIVERMEMORYDATA mem;
+ mem.lpDD = &This->DirectDrawGlobal;
+
+ This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.GetAvailDriverMemory(&mem);
+
+ This->DirectDrawGlobal.ddCaps.dwVidMemFree = mem.dwFree;
+ This->DirectDrawGlobal.ddCaps.dwVidMemTotal = mem.dwTotal;
+
+
+
- /* now all insate of HAL is done and we hopply do not have forget anything*/
+ /* Now all setup for HAL is done and we hopply do not have forget anything */
IDirectDrawVtbl* lpVtbl_v1;
DDRAWI_DIRECTDRAW_GBL DirectDrawGlobal;
IDirectDrawVtbl* lpVtbl_v1;
DDRAWI_DIRECTDRAW_GBL DirectDrawGlobal;
+ DDHAL_DDMISCELLANEOUSCALLBACKS Misc2Callback;
DDHALINFO HalInfo;
HWND window;
DDHALINFO HalInfo;
HWND window;