mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Some cosmetic changes like replacing tabs with spaces and grouping all stubs together.
svn path=/trunk/; revision=18925
This commit is contained in:
parent
e72a06483d
commit
abdfa2a93b
2 changed files with 610 additions and 640 deletions
|
@ -15,317 +15,296 @@ HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
/* point to it self */
|
/* point to it self */
|
||||||
This->DirectDrawGlobal.lp16DD = &This->DirectDrawGlobal;
|
This->DirectDrawGlobal.lp16DD = &This->DirectDrawGlobal;
|
||||||
|
|
||||||
/* get the object */
|
/* get the object */
|
||||||
if(!DdCreateDirectDrawObject (&This->DirectDrawGlobal, This->hdc))
|
if(!DdCreateDirectDrawObject (&This->DirectDrawGlobal, This->hdc))
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
|
|
||||||
/* alloc all the space */
|
/* alloc all the space */
|
||||||
This->DirectDrawGlobal.lpDDCBtmp = (LPDDHAL_CALLBACKS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpDDCBtmp = (LPDDHAL_CALLBACKS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(DDHAL_CALLBACKS));
|
sizeof(DDHAL_CALLBACKS));
|
||||||
|
|
||||||
This->DirectDrawGlobal.lpD3DHALCallbacks = (ULONG_PTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpD3DHALCallbacks = (ULONG_PTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,
|
||||||
sizeof(D3DHAL_CALLBACKS));
|
sizeof(D3DHAL_CALLBACKS));
|
||||||
|
|
||||||
This->DirectDrawGlobal.lpD3DGlobalDriverData = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpD3DGlobalDriverData = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(D3DHAL_GLOBALDRIVERDATA));
|
sizeof(D3DHAL_GLOBALDRIVERDATA));
|
||||||
|
|
||||||
/* Fill in some info */
|
/* Fill in some info */
|
||||||
This->HalInfo.lpD3DGlobalDriverData = This->DirectDrawGlobal.lpD3DGlobalDriverData;
|
This->HalInfo.lpD3DGlobalDriverData = This->DirectDrawGlobal.lpD3DGlobalDriverData;
|
||||||
This->HalInfo.lpD3DHALCallbacks = This->DirectDrawGlobal.lpD3DHALCallbacks;
|
This->HalInfo.lpD3DHALCallbacks = This->DirectDrawGlobal.lpD3DHALCallbacks;
|
||||||
This->HalInfo.lpDDCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDD;
|
This->HalInfo.lpDDCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDD;
|
||||||
This->HalInfo.lpDDExeBufCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDDExeBuf;
|
This->HalInfo.lpDDExeBufCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDDExeBuf;
|
||||||
This->HalInfo.lpDDPaletteCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDDPalette;
|
This->HalInfo.lpDDPaletteCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDDPalette;
|
||||||
This->HalInfo.lpDDSurfaceCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDDSurface;
|
This->HalInfo.lpDDSurfaceCallbacks = &This->DirectDrawGlobal.lpDDCBtmp->HALDDSurface;
|
||||||
|
|
||||||
/* query all kinds of infos from the driver */
|
/* query all kinds of infos from the driver */
|
||||||
if(!DdQueryDirectDrawObject (
|
if(!DdQueryDirectDrawObject (
|
||||||
&This->DirectDrawGlobal,
|
&This->DirectDrawGlobal,
|
||||||
&This->HalInfo,
|
&This->HalInfo,
|
||||||
This->HalInfo.lpDDCallbacks,
|
This->HalInfo.lpDDCallbacks,
|
||||||
This->HalInfo.lpDDSurfaceCallbacks,
|
This->HalInfo.lpDDSurfaceCallbacks,
|
||||||
This->HalInfo.lpDDPaletteCallbacks,
|
This->HalInfo.lpDDPaletteCallbacks,
|
||||||
(LPD3DHAL_CALLBACKS)This->DirectDrawGlobal.lpD3DHALCallbacks,
|
(LPD3DHAL_CALLBACKS)This->DirectDrawGlobal.lpD3DHALCallbacks,
|
||||||
(LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData,
|
(LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData,
|
||||||
This->HalInfo.lpDDExeBufCallbacks,
|
This->HalInfo.lpDDExeBufCallbacks,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL ))
|
NULL ))
|
||||||
{
|
{
|
||||||
return DD_FALSE;
|
return DD_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->HalInfo.vmiData.pvmList = (LPVIDMEM) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->HalInfo.vmiData.pvmList = (LPVIDMEM) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(VIDMEM) * This->HalInfo.vmiData.dwNumHeaps);
|
sizeof(VIDMEM) * This->HalInfo.vmiData.dwNumHeaps);
|
||||||
|
|
||||||
This->DirectDrawGlobal.lpdwFourCC = (DWORD *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpdwFourCC = (DWORD *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(DWORD) * This->HalInfo.ddCaps.dwNumFourCCCodes);
|
sizeof(DWORD) * This->HalInfo.ddCaps.dwNumFourCCCodes);
|
||||||
((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats =
|
((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats =
|
||||||
(LPDDSURFACEDESC) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DDSURFACEDESC) *
|
(LPDDSURFACEDESC) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DDSURFACEDESC) *
|
||||||
((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->dwNumTextureFormats);
|
((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->dwNumTextureFormats);
|
||||||
|
|
||||||
if(!DdQueryDirectDrawObject (
|
if(!DdQueryDirectDrawObject (
|
||||||
&This->DirectDrawGlobal,
|
&This->DirectDrawGlobal,
|
||||||
&This->HalInfo,
|
&This->HalInfo,
|
||||||
This->HalInfo.lpDDCallbacks,
|
This->HalInfo.lpDDCallbacks,
|
||||||
This->HalInfo.lpDDSurfaceCallbacks,
|
This->HalInfo.lpDDSurfaceCallbacks,
|
||||||
This->HalInfo.lpDDPaletteCallbacks,
|
This->HalInfo.lpDDPaletteCallbacks,
|
||||||
(LPD3DHAL_CALLBACKS)This->DirectDrawGlobal.lpD3DHALCallbacks,
|
(LPD3DHAL_CALLBACKS)This->DirectDrawGlobal.lpD3DHALCallbacks,
|
||||||
(LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData,
|
(LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData,
|
||||||
This->HalInfo.lpDDExeBufCallbacks,
|
This->HalInfo.lpDDExeBufCallbacks,
|
||||||
((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats,
|
((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats,
|
||||||
This->DirectDrawGlobal.lpdwFourCC,
|
This->DirectDrawGlobal.lpdwFourCC,
|
||||||
This->HalInfo.vmiData.pvmList
|
This->HalInfo.vmiData.pvmList
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
return DD_FALSE;
|
return DD_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy HalInfo to DirectDrawGlobal (Not complete)*/
|
/* Copy HalInfo to DirectDrawGlobal (Not complete)*/
|
||||||
|
RtlCopyMemory(&This->DirectDrawGlobal.vmiData,&This->HalInfo.vmiData,sizeof(VIDMEMINFO));
|
||||||
RtlCopyMemory(&This->DirectDrawGlobal.vmiData,&This->HalInfo.vmiData,sizeof(VIDMEMINFO));
|
RtlCopyMemory(&This->DirectDrawGlobal.ddCaps,&This->HalInfo.ddCaps,sizeof(DDCORECAPS));
|
||||||
RtlCopyMemory(&This->DirectDrawGlobal.ddCaps,&This->HalInfo.ddCaps,sizeof(DDCORECAPS));
|
This->DirectDrawGlobal.dwMonitorFrequency = This->HalInfo.dwMonitorFrequency;
|
||||||
This->DirectDrawGlobal.dwMonitorFrequency = This->HalInfo.dwMonitorFrequency;
|
|
||||||
|
|
||||||
This->DirectDrawGlobal.dwModeIndex = This->HalInfo.dwModeIndex;
|
This->DirectDrawGlobal.dwModeIndex = This->HalInfo.dwModeIndex;
|
||||||
This->DirectDrawGlobal.dwNumModes = This->HalInfo.dwNumModes;
|
This->DirectDrawGlobal.dwNumModes = This->HalInfo.dwNumModes;
|
||||||
This->DirectDrawGlobal.lpModeInfo = This->HalInfo.lpModeInfo;
|
This->DirectDrawGlobal.lpModeInfo = This->HalInfo.lpModeInfo;
|
||||||
|
|
||||||
|
/* Unsure which of these two for lpPDevice
|
||||||
/* Unsure which of these two for lpPDevice
|
|
||||||
This->DirectDrawGlobal.dwPDevice = This->HalInfo.lpPDevice;
|
This->DirectDrawGlobal.dwPDevice = This->HalInfo.lpPDevice;
|
||||||
This->lpDriverHandle = This->HalInfo.lpPDevice;
|
This->lpDriverHandle = This->HalInfo.lpPDevice;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
This->DirectDrawGlobal.hInstance = This->HalInfo.hInstance;
|
This->DirectDrawGlobal.hInstance = This->HalInfo.hInstance;
|
||||||
|
RtlCopyMemory(&This->DirectDrawGlobal.lpDDCBtmp->HALDDExeBuf,
|
||||||
|
&This->HalInfo.lpDDExeBufCallbacks,sizeof(DDHAL_DDEXEBUFCALLBACKS));
|
||||||
|
|
||||||
RtlCopyMemory(&This->DirectDrawGlobal.lpDDCBtmp->HALDDExeBuf,&This->HalInfo.lpDDExeBufCallbacks,sizeof(DDHAL_DDEXEBUFCALLBACKS));
|
/************************************************************************/
|
||||||
|
/* Set up the rest of the callbacks all callbacks we get back from */
|
||||||
|
/* gdi32.dll is user mode */
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
/* Todo add a check see if HalInfo.GetDriverInfo is supported or not */
|
||||||
|
/* Do not trust msdn what it say about dwContext it is not in use for
|
||||||
|
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);
|
||||||
|
DriverInfo.dwContext = This->DirectDrawGlobal.hDD;
|
||||||
|
|
||||||
|
/* Get ColorControlCallbacks */
|
||||||
|
DriverInfo.guidInfo = GUID_ColorControlCallbacks;
|
||||||
|
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDColorControl;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDCOLORCONTROLCALLBACKS);
|
||||||
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
/* Get the GUID_D3DCallbacks callback */
|
||||||
|
/* Problem with include files
|
||||||
|
DDHAL_DDMISCELLANEOUSCALLBACKS misc;
|
||||||
|
DriverInfo.guidInfo = GUID_D3DCallbacks;
|
||||||
|
DriverInfo.lpvData = &misc;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
|
This->HalInfo.GetDriverInfo( &DriverInfo);*/
|
||||||
|
|
||||||
|
/* Get the D3DCallbacks2 */
|
||||||
|
This->DirectDrawGlobal.lpD3DHALCallbacks2 = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(D3DHAL_CALLBACKS2));
|
||||||
|
DriverInfo.guidInfo = GUID_D3DCallbacks2;
|
||||||
|
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpD3DHALCallbacks2;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof(D3DHAL_CALLBACKS2);
|
||||||
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
|
||||||
|
/* Get the D3DCallbacks3 */
|
||||||
/************************************************************************/
|
|
||||||
/* Set up the rest of the callbacks all callbacks we get back from */
|
|
||||||
/* gdi32.dll is user mode */
|
|
||||||
/************************************************************************/
|
|
||||||
|
|
||||||
/* Todo add a check see if HalInfo.GetDriverInfo is supported or not */
|
|
||||||
|
|
||||||
/* Do not trust msdn what it say about dwContext it is not in use for
|
|
||||||
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);
|
|
||||||
DriverInfo.dwContext = This->DirectDrawGlobal.hDD;
|
|
||||||
|
|
||||||
|
|
||||||
/* Get ColorControlCallbacks */
|
|
||||||
DriverInfo.guidInfo = GUID_ColorControlCallbacks;
|
|
||||||
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDColorControl;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDCOLORCONTROLCALLBACKS);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
|
|
||||||
/* Get the GUID_D3DCallbacks callback */
|
|
||||||
|
|
||||||
/* Problem with include files
|
|
||||||
DDHAL_DDMISCELLANEOUSCALLBACKS misc;
|
|
||||||
DriverInfo.guidInfo = GUID_D3DCallbacks;
|
|
||||||
DriverInfo.lpvData = &misc;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);*/
|
|
||||||
|
|
||||||
/* Get the D3DCallbacks2 */
|
|
||||||
This->DirectDrawGlobal.lpD3DHALCallbacks2 = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
||||||
sizeof(D3DHAL_CALLBACKS2));
|
|
||||||
DriverInfo.guidInfo = GUID_D3DCallbacks2;
|
|
||||||
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpD3DHALCallbacks2;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof(D3DHAL_CALLBACKS2);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
|
|
||||||
/* Get the D3DCallbacks3 */
|
|
||||||
This->DirectDrawGlobal.lpD3DHALCallbacks = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpD3DHALCallbacks = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(D3DHAL_CALLBACKS3));
|
sizeof(D3DHAL_CALLBACKS3));
|
||||||
DriverInfo.guidInfo = GUID_D3DCallbacks3;
|
DriverInfo.guidInfo = GUID_D3DCallbacks3;
|
||||||
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpD3DHALCallbacks;
|
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpD3DHALCallbacks;
|
||||||
DriverInfo.dwExpectedSize = sizeof(D3DHAL_CALLBACKS3);
|
DriverInfo.dwExpectedSize = sizeof(D3DHAL_CALLBACKS3);
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
/* Get the misc callback */
|
||||||
/* Get the misc callback */
|
/* Problem with include files
|
||||||
/* Problem with include files
|
DriverInfo.guidInfo = GUID_D3DCaps;
|
||||||
DriverInfo.guidInfo = GUID_D3DCaps;
|
DriverInfo.lpvData = &misc;
|
||||||
DriverInfo.lpvData = &misc;
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
This->HalInfo.GetDriverInfo( &DriverInfo);
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Get the D3DExtendedCaps */
|
|
||||||
|
|
||||||
This->DirectDrawGlobal.lpD3DExtendedCaps = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
||||||
sizeof(D3DHAL_D3DEXTENDEDCAPS));
|
|
||||||
DriverInfo.guidInfo = GUID_D3DExtendedCaps;
|
|
||||||
DriverInfo.lpvData = (PVOID) This->DirectDrawGlobal.lpD3DExtendedCaps;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof(D3DHAL_D3DEXTENDEDCAPS);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
|
|
||||||
/* Get the D3DParseUnknownCommandCallback */
|
|
||||||
/* D3dDrawPrimitives2 callback where should it be fill in
|
|
||||||
DriverInfo.guidInfo = GUID_D3DParseUnknownCommandCallback;
|
|
||||||
DriverInfo.lpvData = &misc;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get the GetHeapAlignment */
|
/* Get the D3DExtendedCaps */
|
||||||
/* where should it be fill in
|
|
||||||
DriverInfo.guidInfo = GUID_GetHeapAlignment;
|
|
||||||
DriverInfo.lpvData = &misc;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
This->DirectDrawGlobal.lpD3DExtendedCaps = (ULONG_PTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(D3DHAL_D3DEXTENDEDCAPS));
|
||||||
|
DriverInfo.guidInfo = GUID_D3DExtendedCaps;
|
||||||
|
DriverInfo.lpvData = (PVOID) This->DirectDrawGlobal.lpD3DExtendedCaps;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof(D3DHAL_D3DEXTENDEDCAPS);
|
||||||
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
/* Get the KernelCallbacks */
|
/* Get the D3DParseUnknownCommandCallback */
|
||||||
DriverInfo.guidInfo = GUID_KernelCallbacks;
|
/* D3dDrawPrimitives2 callback where should it be fill in
|
||||||
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDKernel;
|
DriverInfo.guidInfo = GUID_D3DParseUnknownCommandCallback;
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDKERNELCALLBACKS);
|
DriverInfo.lpvData = &misc;
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
|
This->HalInfo.GetDriverInfo( &DriverInfo);
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Get the GetHeapAlignment */
|
||||||
|
/* where should it be fill in
|
||||||
|
DriverInfo.guidInfo = GUID_GetHeapAlignment;
|
||||||
|
DriverInfo.lpvData = &misc;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
|
This->HalInfo.GetDriverInfo( &DriverInfo);
|
||||||
|
*/
|
||||||
|
|
||||||
/* Get the KernelCaps */
|
/* Get the KernelCallbacks */
|
||||||
This->DirectDrawGlobal.lpDDKernelCaps = (LPDDKERNELCAPS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
DriverInfo.guidInfo = GUID_KernelCallbacks;
|
||||||
sizeof(DDHAL_DDKERNELCALLBACKS));
|
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDKernel;
|
||||||
DriverInfo.guidInfo = GUID_KernelCaps;
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDKERNELCALLBACKS);
|
||||||
DriverInfo.lpvData = (PVOID) This->DirectDrawGlobal.lpDDKernelCaps;
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDKERNELCALLBACKS);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
|
/* Get the KernelCaps */
|
||||||
|
This->DirectDrawGlobal.lpDDKernelCaps = (LPDDKERNELCAPS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(DDHAL_DDKERNELCALLBACKS));
|
||||||
|
DriverInfo.guidInfo = GUID_KernelCaps;
|
||||||
|
DriverInfo.lpvData = (PVOID) This->DirectDrawGlobal.lpDDKernelCaps;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDKERNELCALLBACKS);
|
||||||
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
/* Get the MiscellaneousCallbacks */
|
/* Get the MiscellaneousCallbacks */
|
||||||
DriverInfo.guidInfo = GUID_MiscellaneousCallbacks;
|
DriverInfo.guidInfo = GUID_MiscellaneousCallbacks;
|
||||||
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous;
|
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous;
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
/* 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.lpvData = &This->Misc2Callback;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
|
||||||
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
/* Get the Miscellaneous2Callbacks */
|
/* Get the MotionCompCallbacks */
|
||||||
/* Not in the DDRAWI_DIRECTDRAW_GBL we map it up as private
|
DriverInfo.guidInfo = GUID_MotionCompCallbacks;
|
||||||
Contain CreatesurfaceEx and other nice callbacks */
|
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDMotionComp;
|
||||||
DriverInfo.guidInfo = GUID_Miscellaneous2Callbacks;
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMOTIONCOMPCALLBACKS);
|
||||||
DriverInfo.lpvData = &This->Misc2Callback;
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
|
|
||||||
/* Get the MotionCompCallbacks */
|
|
||||||
DriverInfo.guidInfo = GUID_MotionCompCallbacks;
|
|
||||||
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDMotionComp;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMOTIONCOMPCALLBACKS);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
|
|
||||||
/* Get the NonLocalVidMemCaps */
|
/* Get the NonLocalVidMemCaps */
|
||||||
This->DirectDrawGlobal.lpddNLVCaps = (LPDDNONLOCALVIDMEMCAPS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpddNLVCaps = (LPDDNONLOCALVIDMEMCAPS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(DDNONLOCALVIDMEMCAPS));
|
sizeof(DDNONLOCALVIDMEMCAPS));
|
||||||
DriverInfo.guidInfo = GUID_NonLocalVidMemCaps;
|
DriverInfo.guidInfo = GUID_NonLocalVidMemCaps;
|
||||||
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpddNLVCaps;
|
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpddNLVCaps;
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDNONLOCALVIDMEMCAPS);
|
DriverInfo.dwExpectedSize = sizeof(DDNONLOCALVIDMEMCAPS);
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
|
||||||
/* Get the NTCallbacks */
|
/* Get the NTCallbacks */
|
||||||
/* Fill in wher
|
/* Fill in wher
|
||||||
DriverInfo.guidInfo = GUID_NTCallbacks;
|
DriverInfo.guidInfo = GUID_NTCallbacks;
|
||||||
DriverInfo.lpvData = &misc;
|
DriverInfo.lpvData = &misc;
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo( &DriverInfo);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get the NTPrivateDriverCaps */
|
/* Get the NTPrivateDriverCaps */
|
||||||
/* Fill in wher
|
/* Fill in wher
|
||||||
DriverInfo.guidInfo = GUID_NTPrivateDriverCaps;
|
DriverInfo.guidInfo = GUID_NTPrivateDriverCaps;
|
||||||
DriverInfo.lpvData = &misc;
|
DriverInfo.lpvData = &misc;
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo( &DriverInfo);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get the UpdateNonLocalHeap */
|
/* Get the UpdateNonLocalHeap */
|
||||||
/* Fill in where
|
/* Fill in where
|
||||||
DriverInfo.guidInfo = GUID_UpdateNonLocalHeap;
|
DriverInfo.guidInfo = GUID_UpdateNonLocalHeap;
|
||||||
DriverInfo.lpvData = &misc;
|
DriverInfo.lpvData = &misc;
|
||||||
DriverInfo.dwExpectedSize = sizeof();
|
DriverInfo.dwExpectedSize = sizeof();
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo( &DriverInfo);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Get the VideoPortCallbacks */
|
/* Get the VideoPortCallbacks */
|
||||||
DriverInfo.guidInfo = GUID_VideoPortCallbacks;
|
DriverInfo.guidInfo = GUID_VideoPortCallbacks;
|
||||||
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDVideoPort;
|
DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDCBtmp->HALDDVideoPort;
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDVIDEOPORTCALLBACKS);
|
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDVIDEOPORTCALLBACKS);
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
/* Get the VideoPortCaps */
|
||||||
|
This->DirectDrawGlobal.lpDDVideoPortCaps = (LPDDVIDEOPORTCAPS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
|
sizeof(DDVIDEOPORTCAPS));
|
||||||
|
DriverInfo.guidInfo = GUID_VideoPortCaps;
|
||||||
|
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpDDVideoPortCaps;
|
||||||
|
DriverInfo.dwExpectedSize = sizeof(DDVIDEOPORTCAPS);
|
||||||
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
/* Get the VideoPortCaps */
|
/* Get the ZPixelFormats */
|
||||||
This->DirectDrawGlobal.lpDDVideoPortCaps = (LPDDVIDEOPORTCAPS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.lpZPixelFormats = (LPDDPIXELFORMAT) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(DDVIDEOPORTCAPS));
|
sizeof(DDPIXELFORMAT) * This->DirectDrawGlobal.dwNumZPixelFormats);
|
||||||
DriverInfo.guidInfo = GUID_VideoPortCaps;
|
DriverInfo.guidInfo = GUID_ZPixelFormats;
|
||||||
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpDDVideoPortCaps;
|
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpZPixelFormats;
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDVIDEOPORTCAPS);
|
DriverInfo.dwExpectedSize = sizeof(DDPIXELFORMAT);
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
This->HalInfo.GetDriverInfo(&DriverInfo);
|
||||||
|
|
||||||
|
/* Setup some info from the callbacks we got */
|
||||||
|
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;
|
||||||
|
|
||||||
/* Get the ZPixelFormats */
|
/* Now all setup for HAL is done */
|
||||||
This->DirectDrawGlobal.lpZPixelFormats = (LPDDPIXELFORMAT) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
return DD_OK;
|
||||||
sizeof(DDPIXELFORMAT) * This->DirectDrawGlobal.dwNumZPixelFormats);
|
|
||||||
DriverInfo.guidInfo = GUID_ZPixelFormats;
|
|
||||||
DriverInfo.lpvData = (PVOID)This->DirectDrawGlobal.lpZPixelFormats;
|
|
||||||
DriverInfo.dwExpectedSize = sizeof(DDPIXELFORMAT);
|
|
||||||
This->HalInfo.GetDriverInfo( &DriverInfo);
|
|
||||||
|
|
||||||
/* Setup some info from the callbacks we got */
|
|
||||||
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 setup for HAL is done */
|
|
||||||
return DD_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface)
|
HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode;
|
DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode;
|
||||||
|
|
||||||
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE))
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE))
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetExclusiveMode.lpDD = &This->DirectDrawGlobal;
|
SetExclusiveMode.lpDD = &This->DirectDrawGlobal;
|
||||||
SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED;
|
SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED;
|
||||||
SetExclusiveMode.dwEnterExcl = This->cooperative_level;
|
SetExclusiveMode.dwEnterExcl = This->cooperative_level;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.SetExclusiveMode(&SetExclusiveMode) != DDHAL_DRIVER_HANDLED)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.SetExclusiveMode(&SetExclusiveMode) != DDHAL_DRIVER_HANDLED)
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SetExclusiveMode.ddRVal;
|
return SetExclusiveMode.ddRVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -333,166 +312,172 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
DdDeleteDirectDrawObject (&This->DirectDrawGlobal);
|
DdDeleteDirectDrawObject (&This->DirectDrawGlobal);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpDDKernelCaps)
|
if(This->DirectDrawGlobal.lpDDKernelCaps)
|
||||||
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpDDKernelCaps);
|
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpDDKernelCaps);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpddNLVCaps)
|
if(This->DirectDrawGlobal.lpddNLVCaps)
|
||||||
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpddNLVCaps);
|
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpddNLVCaps);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpDDVideoPortCaps)
|
if(This->DirectDrawGlobal.lpDDVideoPortCaps)
|
||||||
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpDDVideoPortCaps);
|
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpDDVideoPortCaps);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpdwFourCC)
|
if(This->DirectDrawGlobal.lpdwFourCC)
|
||||||
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpdwFourCC);
|
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpdwFourCC);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpZPixelFormats)
|
if(This->DirectDrawGlobal.lpZPixelFormats)
|
||||||
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpZPixelFormats);
|
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpZPixelFormats);
|
||||||
|
|
||||||
if(This->HalInfo.vmiData.pvmList)
|
if(This->HalInfo.vmiData.pvmList)
|
||||||
HeapFree(GetProcessHeap(), 0, This->HalInfo.vmiData.pvmList);
|
HeapFree(GetProcessHeap(), 0, This->HalInfo.vmiData.pvmList);
|
||||||
|
|
||||||
if(((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats)
|
if(((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats)
|
||||||
HeapFree(GetProcessHeap(), 0, ((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats);
|
HeapFree(GetProcessHeap(), 0, ((LPD3DHAL_GLOBALDRIVERDATA)This->DirectDrawGlobal.lpD3DGlobalDriverData)->lpTextureFormats);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpDDCBtmp)
|
if(This->DirectDrawGlobal.lpDDCBtmp)
|
||||||
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpDDCBtmp);
|
HeapFree(GetProcessHeap(), 0, This->DirectDrawGlobal.lpDDCBtmp);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpD3DHALCallbacks)
|
if(This->DirectDrawGlobal.lpD3DHALCallbacks)
|
||||||
HeapFree(GetProcessHeap(), 0, (PVOID)This->DirectDrawGlobal.lpD3DHALCallbacks);
|
HeapFree(GetProcessHeap(), 0, (PVOID)This->DirectDrawGlobal.lpD3DHALCallbacks);
|
||||||
|
|
||||||
if(This->DirectDrawGlobal.lpD3DGlobalDriverData)
|
if(This->DirectDrawGlobal.lpD3DGlobalDriverData)
|
||||||
HeapFree(GetProcessHeap(), 0, (PVOID)This->DirectDrawGlobal.lpD3DGlobalDriverData);
|
HeapFree(GetProcessHeap(), 0, (PVOID)This->DirectDrawGlobal.lpD3DGlobalDriverData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
LPDWORD total, LPDWORD free)
|
LPDWORD total, LPDWORD free)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
DDHAL_GETAVAILDRIVERMEMORYDATA mem;
|
DDHAL_GETAVAILDRIVERMEMORYDATA mem;
|
||||||
|
|
||||||
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY))
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY))
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
mem.lpDD = &This->DirectDrawGlobal;
|
mem.lpDD = &This->DirectDrawGlobal;
|
||||||
mem.ddRVal = DDERR_NOTPALETTIZED;
|
mem.ddRVal = DDERR_NOTPALETTIZED;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.GetAvailDriverMemory(&mem) != DDHAL_DRIVER_HANDLED)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.GetAvailDriverMemory(&mem) != DDHAL_DRIVER_HANDLED)
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ddscaps->dwCaps = mem.DDSCaps.dwCaps;
|
ddscaps->dwCaps = mem.DDSCaps.dwCaps;
|
||||||
ddscaps->dwCaps2 = mem.ddsCapsEx.dwCaps2;
|
ddscaps->dwCaps2 = mem.ddsCapsEx.dwCaps2;
|
||||||
ddscaps->dwCaps3 = mem.ddsCapsEx.dwCaps3;
|
ddscaps->dwCaps3 = mem.ddsCapsEx.dwCaps3;
|
||||||
ddscaps->dwCaps4 = mem.ddsCapsEx.dwCaps4;
|
ddscaps->dwCaps4 = mem.ddsCapsEx.dwCaps4;
|
||||||
*total = mem.dwTotal;
|
*total = mem.dwTotal;
|
||||||
*free = mem.dwFree;
|
*free = mem.dwFree;
|
||||||
|
|
||||||
return mem.ddRVal;
|
return mem.ddRVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,HANDLE h)
|
HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,HANDLE h)
|
||||||
{
|
{
|
||||||
|
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
DDHAL_WAITFORVERTICALBLANKDATA WaitVectorData;
|
DDHAL_WAITFORVERTICALBLANKDATA WaitVectorData;
|
||||||
|
|
||||||
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK))
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK))
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
WaitVectorData.lpDD = &This->DirectDrawGlobal;
|
WaitVectorData.lpDD = &This->DirectDrawGlobal;
|
||||||
WaitVectorData.dwFlags = dwFlags;
|
WaitVectorData.dwFlags = dwFlags;
|
||||||
WaitVectorData.hEvent = (DWORD)h;
|
WaitVectorData.hEvent = (DWORD)h;
|
||||||
WaitVectorData.ddRVal = DDERR_NOTPALETTIZED;
|
WaitVectorData.ddRVal = DDERR_NOTPALETTIZED;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.WaitForVerticalBlank(&WaitVectorData) != DDHAL_DRIVER_HANDLED)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.WaitForVerticalBlank(&WaitVectorData) != DDHAL_DRIVER_HANDLED)
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return WaitVectorData.ddRVal;
|
return WaitVectorData.ddRVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine)
|
HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
DDHAL_GETSCANLINEDATA GetScan;
|
DDHAL_GETSCANLINEDATA GetScan;
|
||||||
|
|
||||||
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE))
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE))
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetScan.lpDD = &This->DirectDrawGlobal;
|
GetScan.lpDD = &This->DirectDrawGlobal;
|
||||||
GetScan.ddRVal = DDERR_NOTPALETTIZED;
|
GetScan.ddRVal = DDERR_NOTPALETTIZED;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.GetScanLine(&GetScan) != DDHAL_DRIVER_HANDLED)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.GetScanLine(&GetScan) != DDHAL_DRIVER_HANDLED)
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
*lpdwScanLine = GetScan.ddRVal;
|
*lpdwScanLine = GetScan.ddRVal;
|
||||||
return GetScan.ddRVal;
|
return GetScan.ddRVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
|
HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
DDHAL_FLIPTOGDISURFACEDATA FlipGdi;
|
DDHAL_FLIPTOGDISURFACEDATA FlipGdi;
|
||||||
|
|
||||||
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE))
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE))
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
FlipGdi.lpDD = &This->DirectDrawGlobal;
|
FlipGdi.lpDD = &This->DirectDrawGlobal;
|
||||||
FlipGdi.ddRVal = DDERR_NOTPALETTIZED;
|
FlipGdi.ddRVal = DDERR_NOTPALETTIZED;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.FlipToGDISurface(&FlipGdi) != DDHAL_DRIVER_HANDLED)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.FlipToGDISurface(&FlipGdi) != DDHAL_DRIVER_HANDLED)
|
||||||
{
|
{
|
||||||
return DDERR_NODRIVERSUPPORT;
|
return DDERR_NODRIVERSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME where should FlipGdi.dwToGDI be fill in */
|
/* FIXME where should FlipGdi.dwToGDI be fill in */
|
||||||
return FlipGdi.ddRVal;
|
return FlipGdi.ddRVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
|
HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
|
||||||
DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
DDHAL_SETMODEDATA mode;
|
DX_STUB;
|
||||||
|
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
|
||||||
|
|
||||||
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETMODE))
|
|
||||||
{
|
|
||||||
return DDERR_NODRIVERSUPPORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
mode.lpDD = &This->DirectDrawGlobal;
|
|
||||||
mode.ddRVal = DDERR_NODRIVERSUPPORT;
|
|
||||||
|
|
||||||
/* FIXME : add search for which mode.ModeIndex we should use */
|
|
||||||
/* FIXME : fill the mode.inexcl; */
|
|
||||||
/* FIXME : fill the mode.useRefreshRate; */
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.SetMode(&mode) != DDHAL_DRIVER_HANDLED)
|
|
||||||
{
|
|
||||||
return DDERR_NODRIVERSUPPORT;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
DX_STUB;
|
|
||||||
/* return mode.ddRVal */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
|
||||||
|
DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETMODE))
|
||||||
|
{
|
||||||
|
return DDERR_NODRIVERSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
DDHAL_SETMODEDATA mode;
|
||||||
|
mode.lpDD = &This->DirectDrawGlobal;
|
||||||
|
mode.ddRVal = DDERR_NODRIVERSUPPORT;
|
||||||
|
|
||||||
|
// FIXME : add search for which mode.ModeIndex we should use
|
||||||
|
// FIXME : fill the mode.inexcl;
|
||||||
|
// FIXME : fill the mode.useRefreshRate;
|
||||||
|
|
||||||
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.SetMode(&mode) != DDHAL_DRIVER_HANDLED)
|
||||||
|
{
|
||||||
|
return DDERR_NODRIVERSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mode.ddRVal
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -14,90 +14,86 @@
|
||||||
HRESULT WINAPI Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
|
HRESULT WINAPI Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
|
|
||||||
|
// this if it is not called by DirectDrawCreate
|
||||||
|
if(FALSE)
|
||||||
|
return DDERR_ALREADYINITIALIZED;
|
||||||
|
|
||||||
|
// save the parameter
|
||||||
|
This->lpGUID = lpGUID;
|
||||||
|
|
||||||
// this if it is not called by DirectDrawCreate
|
// get the HDC
|
||||||
if(FALSE)
|
This->hdc = GetWindowDC(GetDesktopWindow());
|
||||||
return DDERR_ALREADYINITIALIZED;
|
This->Height = GetDeviceCaps(This->hdc, VERTRES);
|
||||||
|
This->Width = GetDeviceCaps(This->hdc, HORZRES);
|
||||||
|
This->Bpp = GetDeviceCaps(This->hdc, BITSPIXEL);
|
||||||
|
|
||||||
// save the parameter
|
// call software first
|
||||||
This->lpGUID = lpGUID;
|
if((ret = Hal_DirectDraw_Initialize (iface)) != DD_OK)
|
||||||
|
return ret;
|
||||||
|
|
||||||
// get the HDC
|
// ... then overwrite with hal
|
||||||
This->hdc = GetWindowDC(GetDesktopWindow());
|
if((ret = Hel_DirectDraw_Initialize (iface)) != DD_OK)
|
||||||
This->Height = GetDeviceCaps(This->hdc, VERTRES);
|
return ret;
|
||||||
This->Width = GetDeviceCaps(This->hdc, HORZRES);
|
|
||||||
This->Bpp = GetDeviceCaps(This->hdc, BITSPIXEL);
|
|
||||||
|
|
||||||
// call software first
|
return DD_OK;
|
||||||
if((ret = Hal_DirectDraw_Initialize (iface)) != DD_OK)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
// ... then overwrite with hal
|
|
||||||
if((ret = Hel_DirectDraw_Initialize (iface)) != DD_OK)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
|
|
||||||
return DD_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel)
|
HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
// - create a scaner that check which driver we should get the HDC from
|
// - create a scaner that check which driver we should get the HDC from
|
||||||
// for now we always asume it is the active dirver that should be use.
|
// for now we always asume it is the active dirver that should be use.
|
||||||
// - allow more Flags
|
// - allow more Flags
|
||||||
|
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
// check the parameters
|
// check the parameters
|
||||||
if (This->cooperative_level == cooplevel && This->window == hwnd)
|
if (This->cooperative_level == cooplevel && This->window == hwnd)
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
|
|
||||||
if (This->window)
|
if (This->window)
|
||||||
return DDERR_HWNDALREADYSET;
|
return DDERR_HWNDALREADYSET;
|
||||||
|
|
||||||
if (This->cooperative_level)
|
if (This->cooperative_level)
|
||||||
return DDERR_EXCLUSIVEMODEALREADYSET;
|
return DDERR_EXCLUSIVEMODEALREADYSET;
|
||||||
|
|
||||||
if ((cooplevel&DDSCL_EXCLUSIVE) && !(cooplevel&DDSCL_FULLSCREEN))
|
if ((cooplevel&DDSCL_EXCLUSIVE) && !(cooplevel&DDSCL_FULLSCREEN))
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
if (cooplevel&DDSCL_NORMAL && cooplevel&DDSCL_FULLSCREEN)
|
if (cooplevel&DDSCL_NORMAL && cooplevel&DDSCL_FULLSCREEN)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
// set the data
|
|
||||||
This->window = hwnd;
|
|
||||||
This->hdc = GetDC(hwnd);
|
|
||||||
This->cooperative_level = cooplevel;
|
|
||||||
|
|
||||||
|
// set the data
|
||||||
|
This->window = hwnd;
|
||||||
|
This->hdc = GetDC(hwnd);
|
||||||
|
This->cooperative_level = cooplevel;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)
|
||||||
{
|
{
|
||||||
return Hal_DirectDraw_SetCooperativeLevel (iface);
|
return Hal_DirectDraw_SetCooperativeLevel (iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Hel_DirectDraw_SetCooperativeLevel(iface);
|
return Hel_DirectDraw_SetCooperativeLevel(iface);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
|
HRESULT WINAPI Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
|
||||||
DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
/* FIXME implement hal setMode */
|
/* FIXME implement hal setMode */
|
||||||
if((ret = Hal_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight,
|
if((ret = Hal_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight,
|
||||||
dwBPP, dwRefreshRate, dwFlags)) == DD_OK)
|
dwBPP, dwRefreshRate, dwFlags)) == DD_OK)
|
||||||
{
|
{
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = Hel_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight, dwBPP, dwRefreshRate, dwFlags);
|
ret = Hel_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight, dwBPP, dwRefreshRate, dwFlags);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI Main_DirectDraw_AddRef (LPDIRECTDRAW7 iface)
|
ULONG WINAPI Main_DirectDraw_AddRef (LPDIRECTDRAW7 iface)
|
||||||
|
@ -105,7 +101,7 @@ ULONG WINAPI Main_DirectDraw_AddRef (LPDIRECTDRAW7 iface)
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
ULONG ref = InterlockedIncrement((PLONG)&This->DirectDrawGlobal.dwRefCnt);
|
ULONG ref = InterlockedIncrement((PLONG)&This->DirectDrawGlobal.dwRefCnt);
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI Main_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
ULONG WINAPI Main_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
||||||
|
@ -115,41 +111,41 @@ ULONG WINAPI Main_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
||||||
|
|
||||||
if (ref == 0)
|
if (ref == 0)
|
||||||
{
|
{
|
||||||
// set resoltion back to the one in registry
|
// set resoltion back to the one in registry
|
||||||
if(This->cooperative_level & DDSCL_EXCLUSIVE)
|
if(This->cooperative_level & DDSCL_EXCLUSIVE)
|
||||||
ChangeDisplaySettings(NULL, 0);
|
ChangeDisplaySettings(NULL, 0);
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_QueryInterface (
|
HRESULT WINAPI Main_DirectDraw_QueryInterface (
|
||||||
LPDIRECTDRAW7 iface, REFIID id, LPVOID *obj )
|
LPDIRECTDRAW7 iface, REFIID id, LPVOID *obj )
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
||||||
{
|
{
|
||||||
*obj = &This->lpVtbl;
|
*obj = &This->lpVtbl;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirectDraw, id))
|
else if (IsEqualGUID(&IID_IDirectDraw, id))
|
||||||
{
|
{
|
||||||
*obj = &This->lpVtbl_v1;
|
*obj = &This->lpVtbl_v1;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirectDraw2, id))
|
else if (IsEqualGUID(&IID_IDirectDraw2, id))
|
||||||
{
|
{
|
||||||
*obj = &This->lpVtbl_v2;
|
*obj = &This->lpVtbl_v2;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirectDraw4, id))
|
else if (IsEqualGUID(&IID_IDirectDraw4, id))
|
||||||
{
|
{
|
||||||
*obj = &This->lpVtbl_v4;
|
*obj = &This->lpVtbl_v4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*obj = NULL;
|
*obj = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Main_DirectDraw_AddRef(iface);
|
Main_DirectDraw_AddRef(iface);
|
||||||
|
@ -157,183 +153,147 @@ HRESULT WINAPI Main_DirectDraw_QueryInterface (
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
|
HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
|
||||||
LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter)
|
LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter)
|
||||||
{
|
{
|
||||||
if (pUnkOuter!=NULL)
|
if (pUnkOuter!=NULL)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
if(sizeof(DDSURFACEDESC2)!=pDDSD->dwSize)
|
if(sizeof(DDSURFACEDESC2)!=pDDSD->dwSize)
|
||||||
return DDERR_UNSUPPORTED;
|
return DDERR_UNSUPPORTED;
|
||||||
|
|
||||||
// the nasty com stuff
|
// the nasty com stuff
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
IDirectDrawSurfaceImpl* That;
|
IDirectDrawSurfaceImpl* That;
|
||||||
|
|
||||||
That = (IDirectDrawSurfaceImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawSurfaceImpl));
|
That = (IDirectDrawSurfaceImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawSurfaceImpl));
|
||||||
|
|
||||||
if (That == NULL)
|
if (That == NULL)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
ZeroMemory(That, sizeof(IDirectDrawSurfaceImpl));
|
ZeroMemory(That, sizeof(IDirectDrawSurfaceImpl));
|
||||||
|
|
||||||
That->lpVtbl = &DirectDrawSurface7_Vtable;
|
That->lpVtbl = &DirectDrawSurface7_Vtable;
|
||||||
That->lpVtbl_v3 = &DDRAW_IDDS3_Thunk_VTable;
|
That->lpVtbl_v3 = &DDRAW_IDDS3_Thunk_VTable;
|
||||||
|
|
||||||
This->DirectDrawGlobal.dsList = (LPDDRAWI_DDRAWSURFACE_INT)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
This->DirectDrawGlobal.dsList = (LPDDRAWI_DDRAWSURFACE_INT)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(DDRAWI_DDRAWSURFACE_INT));
|
sizeof(DDRAWI_DDRAWSURFACE_INT));
|
||||||
|
That->owner = (IDirectDrawImpl *)This;
|
||||||
|
That->owner->DirectDrawGlobal.dsList->dwIntRefCnt =1;
|
||||||
|
|
||||||
That->owner = (IDirectDrawImpl *)This;
|
/* we alwasy set to use the DirectDrawSurface7_Vtable as internel */
|
||||||
|
That->owner->DirectDrawGlobal.dsList->lpVtbl = (PVOID) &DirectDrawSurface7_Vtable;
|
||||||
|
|
||||||
That->owner->DirectDrawGlobal.dsList->dwIntRefCnt =1;
|
*ppSurf = (LPDIRECTDRAWSURFACE7)That;
|
||||||
|
|
||||||
/* we alwasy set to use the DirectDrawSurface7_Vtable as internel */
|
// the real surface object creation
|
||||||
That->owner->DirectDrawGlobal.dsList->lpVtbl = (PVOID) &DirectDrawSurface7_Vtable;
|
return That->lpVtbl->Initialize (*ppSurf, (LPDIRECTDRAW)iface, pDDSD);
|
||||||
|
|
||||||
|
|
||||||
*ppSurf = (LPDIRECTDRAWSURFACE7)That;
|
|
||||||
|
|
||||||
// the real surface object creation
|
|
||||||
return That->lpVtbl->Initialize (*ppSurf, (LPDIRECTDRAW)iface, pDDSD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
HRESULT WINAPI Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
LPDIRECTDRAWCLIPPER *ppClipper, IUnknown *pUnkOuter)
|
LPDIRECTDRAWCLIPPER *ppClipper, IUnknown *pUnkOuter)
|
||||||
{
|
{
|
||||||
if (pUnkOuter!=NULL)
|
if (pUnkOuter!=NULL)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
IDirectDrawClipperImpl* That;
|
IDirectDrawClipperImpl* That;
|
||||||
That = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawClipperImpl));
|
That = (IDirectDrawClipperImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawClipperImpl));
|
||||||
|
|
||||||
if (That == NULL)
|
if (That == NULL)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
ZeroMemory(That, sizeof(IDirectDrawClipperImpl));
|
ZeroMemory(That, sizeof(IDirectDrawClipperImpl));
|
||||||
|
|
||||||
That->lpVtbl = &DirectDrawClipper_Vtable;
|
That->lpVtbl = &DirectDrawClipper_Vtable;
|
||||||
That->ref = 1;
|
That->ref = 1;
|
||||||
*ppClipper = (LPDIRECTDRAWCLIPPER)That;
|
*ppClipper = (LPDIRECTDRAWCLIPPER)That;
|
||||||
|
|
||||||
return That->lpVtbl->Initialize (*ppClipper, (LPDIRECTDRAW)iface, dwFlags);
|
return That->lpVtbl->Initialize (*ppClipper, (LPDIRECTDRAW)iface, dwFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is exported by the dll
|
// This function is exported by the dll
|
||||||
HRESULT WINAPI DirectDrawCreateClipper (DWORD dwFlags,
|
HRESULT WINAPI DirectDrawCreateClipper (DWORD dwFlags,
|
||||||
LPDIRECTDRAWCLIPPER* lplpDDClipper, LPUNKNOWN pUnkOuter)
|
LPDIRECTDRAWCLIPPER* lplpDDClipper, LPUNKNOWN pUnkOuter)
|
||||||
{
|
{
|
||||||
return Main_DirectDraw_CreateClipper(NULL, dwFlags, lplpDDClipper, pUnkOuter);
|
return Main_DirectDraw_CreateClipper(NULL, dwFlags, lplpDDClipper, pUnkOuter);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE* ppPalette, LPUNKNOWN pUnkOuter)
|
LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE* ppPalette, LPUNKNOWN pUnkOuter)
|
||||||
{
|
{
|
||||||
if (pUnkOuter!=NULL)
|
if (pUnkOuter!=NULL)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
IDirectDrawPaletteImpl* That;
|
IDirectDrawPaletteImpl* That;
|
||||||
That = (IDirectDrawPaletteImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawPaletteImpl));
|
That = (IDirectDrawPaletteImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawPaletteImpl));
|
||||||
|
|
||||||
if (That == NULL)
|
if (That == NULL)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
ZeroMemory(That, sizeof(IDirectDrawPaletteImpl));
|
ZeroMemory(That, sizeof(IDirectDrawPaletteImpl));
|
||||||
|
|
||||||
That->lpVtbl = &DirectDrawPalette_Vtable;
|
That->lpVtbl = &DirectDrawPalette_Vtable;
|
||||||
That->ref = 1;
|
That->ref = 1;
|
||||||
*ppPalette = (LPDIRECTDRAWPALETTE)That;
|
*ppPalette = (LPDIRECTDRAWPALETTE)That;
|
||||||
|
|
||||||
return That->lpVtbl->Initialize (*ppPalette, (LPDIRECTDRAW)iface, dwFlags, palent);
|
return That->lpVtbl->Initialize (*ppPalette, (LPDIRECTDRAW)iface, dwFlags, palent);
|
||||||
}
|
|
||||||
|
|
||||||
/**** Stubs ****/
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
|
|
||||||
{
|
|
||||||
DX_STUB;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7 iface, LPDIRECTDRAWSURFACE7 src,
|
|
||||||
LPDIRECTDRAWSURFACE7* dst)
|
|
||||||
{
|
|
||||||
DX_STUB;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
|
||||||
LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback)
|
|
||||||
{
|
|
||||||
DX_STUB;
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
|
||||||
LPDDSURFACEDESC2 lpDDSD2, LPVOID context,
|
|
||||||
LPDDENUMSURFACESCALLBACK7 callback)
|
|
||||||
{
|
|
||||||
DX_STUB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
|
HRESULT WINAPI Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE)
|
||||||
{
|
{
|
||||||
return Hal_DirectDraw_FlipToGDISurface( iface);
|
return Hal_DirectDraw_FlipToGDISurface( iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Hel_DirectDraw_FlipToGDISurface( iface);
|
return Hel_DirectDraw_FlipToGDISurface( iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
|
HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
|
||||||
LPDDCAPS pHELCaps)
|
LPDDCAPS pHELCaps)
|
||||||
{
|
{
|
||||||
DWORD status = DD_FALSE;
|
DWORD status = DD_FALSE;
|
||||||
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
||||||
|
|
||||||
if (pDriverCaps != NULL)
|
if (pDriverCaps != NULL)
|
||||||
{
|
{
|
||||||
RtlCopyMemory(pDriverCaps,&This->DirectDrawGlobal.ddCaps,sizeof(DDCORECAPS));
|
RtlCopyMemory(pDriverCaps,&This->DirectDrawGlobal.ddCaps,sizeof(DDCORECAPS));
|
||||||
status = DD_OK;
|
status = DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pHELCaps != NULL)
|
if (pHELCaps != NULL)
|
||||||
{
|
{
|
||||||
RtlCopyMemory(pDriverCaps,&This->DirectDrawGlobal.ddHELCaps,sizeof(DDCORECAPS));
|
RtlCopyMemory(pDriverCaps,&This->DirectDrawGlobal.ddHELCaps,sizeof(DDCORECAPS));
|
||||||
status = DD_OK;
|
status = DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Both caps mixed ?? */
|
/* Both caps mixed ?? */
|
||||||
/* DDCORECAPS ddBothCaps; */
|
/* DDCORECAPS ddBothCaps; */
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD)
|
HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
||||||
|
|
||||||
if (pDDSD == NULL)
|
if (pDDSD == NULL)
|
||||||
{
|
{
|
||||||
return DD_FALSE;
|
return DD_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pDDSD->dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE | DDSD_WIDTH;
|
pDDSD->dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE | DDSD_WIDTH;
|
||||||
pDDSD->dwHeight = This->DirectDrawGlobal.vmiData.dwDisplayHeight;
|
pDDSD->dwHeight = This->DirectDrawGlobal.vmiData.dwDisplayHeight;
|
||||||
pDDSD->dwWidth = This->DirectDrawGlobal.vmiData.dwDisplayWidth;
|
pDDSD->dwWidth = This->DirectDrawGlobal.vmiData.dwDisplayWidth;
|
||||||
|
|
||||||
/* FIXME Do not use DUMMYUNIONNAME1 some how union lPitch does not see by the compiler
|
|
||||||
but rest of the union are visable. more header problem ???
|
|
||||||
*/
|
|
||||||
pDDSD->lPitch = This->DirectDrawGlobal.vmiData.lDisplayPitch;
|
pDDSD->lPitch = This->DirectDrawGlobal.vmiData.lDisplayPitch;
|
||||||
|
|
||||||
|
|
||||||
/* have not check where I should get hold of this info yet
|
|
||||||
DWORD dwBackBufferCount;
|
|
||||||
*/
|
|
||||||
|
|
||||||
pDDSD->dwRefreshRate = This->DirectDrawGlobal.dwMonitorFrequency;
|
pDDSD->dwRefreshRate = This->DirectDrawGlobal.dwMonitorFrequency;
|
||||||
|
|
||||||
/* have not check where I should get hold of this info yet
|
/* have not check where I should get hold of this info yet */
|
||||||
|
DWORD dwBackBufferCount;
|
||||||
|
|
||||||
|
/* have not check where I should get hold of this info yet
|
||||||
DWORD dwAlphaBitDepth;
|
DWORD dwAlphaBitDepth;
|
||||||
DWORD dwReserved;
|
DWORD dwReserved;
|
||||||
LPVOID lpSurface;
|
LPVOID lpSurface;
|
||||||
|
@ -345,123 +305,148 @@ HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDE
|
||||||
DDCOLORKEY ddckCKDestBlt;
|
DDCOLORKEY ddckCKDestBlt;
|
||||||
DDCOLORKEY ddckCKSrcOverlay;
|
DDCOLORKEY ddckCKSrcOverlay;
|
||||||
DDCOLORKEY ddckCKSrcBlt;
|
DDCOLORKEY ddckCKSrcBlt;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
RtlCopyMemory(&pDDSD->ddpfPixelFormat,&This->DirectDrawGlobal.vmiData.ddpfDisplay,sizeof(DDPIXELFORMAT));
|
RtlCopyMemory(&pDDSD->ddpfPixelFormat,&This->DirectDrawGlobal.vmiData.ddpfDisplay,sizeof(DDPIXELFORMAT));
|
||||||
RtlCopyMemory(&pDDSD->ddsCaps,&This->DirectDrawGlobal.ddCaps,sizeof(DDCORECAPS));
|
RtlCopyMemory(&pDDSD->ddsCaps,&This->DirectDrawGlobal.ddCaps,sizeof(DDCORECAPS));
|
||||||
|
|
||||||
/* have not check where I should get hold of this info yet
|
/* have not check where I should get hold of this info yet
|
||||||
DWORD dwTextureStage;
|
DWORD dwTextureStage;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
HRESULT WINAPI Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD pNumCodes, LPDWORD pCodes)
|
HANDLE h)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
|
||||||
|
{
|
||||||
|
return Hal_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Hel_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface,
|
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
LPDIRECTDRAWSURFACE7 *lplpGDIDDSSurface)
|
LPDWORD total, LPDWORD free)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY)
|
||||||
|
{
|
||||||
|
return Hal_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Hel_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency(LPDIRECTDRAW7 iface,LPDWORD freq)
|
HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency(LPDIRECTDRAW7 iface,LPDWORD freq)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
||||||
|
|
||||||
if (freq == NULL)
|
if (freq == NULL)
|
||||||
{
|
{
|
||||||
return DD_FALSE;
|
return DD_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*freq = This->DirectDrawGlobal.dwMonitorFrequency;
|
*freq = This->DirectDrawGlobal.dwMonitorFrequency;
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine)
|
HRESULT WINAPI Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine)
|
||||||
{
|
{
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE)
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE)
|
||||||
{
|
{
|
||||||
return Hal_DirectDraw_GetScanLine( iface, lpdwScanLine);
|
return Hal_DirectDraw_GetScanLine( iface, lpdwScanLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Hel_DirectDraw_GetScanLine( iface, lpdwScanLine);
|
return Hel_DirectDraw_GetScanLine( iface, lpdwScanLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************** Stubs **********************************/
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7 iface, LPDIRECTDRAWSURFACE7 src,
|
||||||
|
LPDIRECTDRAWSURFACE7* dst)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
|
LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
|
LPDDSURFACEDESC2 lpDDSD2, LPVOID context,
|
||||||
|
LPDDENUMSURFACESCALLBACK7 callback)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD pNumCodes, LPDWORD pCodes)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface,
|
||||||
|
LPDIRECTDRAWSURFACE7 *lplpGDIDDSSurface)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus(LPDIRECTDRAW7 iface, LPBOOL status)
|
HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus(LPDIRECTDRAW7 iface, LPBOOL status)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface)
|
HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
|
||||||
HANDLE h)
|
|
||||||
{
|
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
|
|
||||||
{
|
|
||||||
return Hal_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Hel_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
|
||||||
LPDWORD total, LPDWORD free)
|
|
||||||
{
|
|
||||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
|
||||||
|
|
||||||
if (This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY)
|
|
||||||
{
|
|
||||||
return Hal_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Hel_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC hdc,
|
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC hdc,
|
||||||
LPDIRECTDRAWSURFACE7 *lpDDS)
|
LPDIRECTDRAWSURFACE7 *lpDDS)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_RestoreAllSurfaces(LPDIRECTDRAW7 iface)
|
HRESULT WINAPI Main_DirectDraw_RestoreAllSurfaces(LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW7 iface)
|
HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
|
HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
|
||||||
LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
|
LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_StartModeTest(LPDIRECTDRAW7 iface, LPSIZE pModes,
|
HRESULT WINAPI Main_DirectDraw_StartModeTest(LPDIRECTDRAW7 iface, LPSIZE pModes,
|
||||||
DWORD dwNumModes, DWORD dwFlags)
|
DWORD dwNumModes, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_EvaluateMode(LPDIRECTDRAW7 iface,DWORD a,DWORD* b)
|
HRESULT WINAPI Main_DirectDraw_EvaluateMode(LPDIRECTDRAW7 iface,DWORD a,DWORD* b)
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDirectDraw7Vtbl DirectDraw7_Vtable =
|
IDirectDraw7Vtbl DirectDraw7_Vtable =
|
||||||
|
|
Loading…
Reference in a new issue