mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Add second call to DdQueryDirectDrawObject.
svn path=/trunk/; revision=17238
This commit is contained in:
parent
c2fcc4a380
commit
225642a5f6
2 changed files with 32 additions and 9 deletions
|
@ -19,11 +19,11 @@ HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
|
|||
return DDERR_INVALIDPARAMS;
|
||||
|
||||
This->HalInfo.dwSize = sizeof(DDHALINFO);
|
||||
This->D3dDriverData.dwSize = sizeof(D3DHAL_GLOBALDRIVERDATA);
|
||||
This->DriverCallbacks.DdMain.dwSize = sizeof(DDHAL_DDCALLBACKS);
|
||||
This->DriverCallbacks.DdSurface.dwSize = sizeof(DDHAL_DDSURFACECALLBACKS);
|
||||
This->DriverCallbacks.DdPalette.dwSize = sizeof(DDHAL_DDPALETTECALLBACKS);
|
||||
This->DriverCallbacks.D3dMain.dwSize = sizeof(D3DHAL_CALLBACKS);
|
||||
This->DriverCallbacks.D3dDriverData.dwSize = sizeof(D3DHAL_GLOBALDRIVERDATA);
|
||||
This->DriverCallbacks.D3dBufferCallbacks.dwSize = sizeof(DDHAL_DDEXEBUFCALLBACKS);
|
||||
|
||||
if(!DdQueryDirectDrawObject (
|
||||
|
@ -33,14 +33,30 @@ HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
|
|||
&This->DriverCallbacks.DdSurface,
|
||||
&This->DriverCallbacks.DdPalette,
|
||||
&This->DriverCallbacks.D3dMain,
|
||||
&This->DriverCallbacks.D3dDriverData,
|
||||
&This->D3dDriverData,
|
||||
&This->DriverCallbacks.D3dBufferCallbacks,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL ))
|
||||
return DDERR_INVALIDPARAMS;
|
||||
|
||||
// ToDo: Second DdQueryDirectDrawObject without the three NULLs
|
||||
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);
|
||||
|
||||
if(!DdQueryDirectDrawObject (
|
||||
&This->DirectDrawGlobal,
|
||||
&This->HalInfo,
|
||||
&This->DriverCallbacks.DdMain,
|
||||
&This->DriverCallbacks.DdSurface,
|
||||
&This->DriverCallbacks.DdPalette,
|
||||
&This->DriverCallbacks.D3dMain,
|
||||
&This->D3dDriverData,
|
||||
&This->DriverCallbacks.D3dBufferCallbacks,
|
||||
This->pD3dTextureFormats,
|
||||
This->pdwFourCC,
|
||||
This->pvmList ))
|
||||
return DDERR_INVALIDPARAMS;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
@ -55,8 +71,11 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
|||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||
|
||||
DdDeleteDirectDrawObject (&This->DirectDrawGlobal);
|
||||
|
||||
if(This->pD3dTextureFormats)
|
||||
HeapFree(GetProcessHeap(), 0, This->pD3dTextureFormats);
|
||||
if(This->pdwFourCC)
|
||||
HeapFree(GetProcessHeap(), 0, This->pdwFourCC);
|
||||
if(This->pvmList)
|
||||
HeapFree(GetProcessHeap(), 0, This->pvmList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ typedef struct
|
|||
DDHAL_DDSURFACECALLBACKS DdSurface;
|
||||
DDHAL_DDPALETTECALLBACKS DdPalette;
|
||||
D3DHAL_CALLBACKS D3dMain;
|
||||
D3DHAL_GLOBALDRIVERDATA D3dDriverData;
|
||||
DDHAL_DDEXEBUFCALLBACKS D3dBufferCallbacks;
|
||||
|
||||
} DRIVERCALLBACKS;
|
||||
|
@ -33,7 +32,12 @@ typedef struct
|
|||
DRIVERCALLBACKS DriverCallbacks;
|
||||
DWORD ref;
|
||||
|
||||
DDHALINFO HalInfo;
|
||||
DDHALINFO HalInfo;
|
||||
D3DHAL_GLOBALDRIVERDATA D3dDriverData;
|
||||
|
||||
LPDDSURFACEDESC pD3dTextureFormats;
|
||||
LPDWORD pdwFourCC;
|
||||
LPVIDMEM pvmList;
|
||||
|
||||
HWND window;
|
||||
DWORD cooperative_level;
|
||||
|
|
Loading…
Reference in a new issue