mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Implement Hal GetAvailableVidMem and is it working in windows
svn path=/trunk/; revision=18864
This commit is contained in:
parent
c55ab58a88
commit
fd2311a670
4 changed files with 59 additions and 4 deletions
|
@ -354,3 +354,33 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
||||||
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,
|
||||||
|
LPDWORD total, LPDWORD free)
|
||||||
|
{
|
||||||
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
|
|
||||||
|
DDHAL_GETAVAILDRIVERMEMORYDATA mem;
|
||||||
|
|
||||||
|
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY))
|
||||||
|
{
|
||||||
|
return DDERR_NODRIVERSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
mem.lpDD = &This->DirectDrawGlobal;
|
||||||
|
if (This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.GetAvailDriverMemory(&mem) != DDHAL_DRIVER_HANDLED)
|
||||||
|
{
|
||||||
|
return DDERR_NODRIVERSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ddscaps->dwCaps = mem.DDSCaps.dwCaps;
|
||||||
|
ddscaps->dwCaps2 = mem.ddsCapsEx.dwCaps2;
|
||||||
|
ddscaps->dwCaps3 = mem.ddsCapsEx.dwCaps3;
|
||||||
|
ddscaps->dwCaps4 = mem.ddsCapsEx.dwCaps4;
|
||||||
|
*total = mem.dwTotal;
|
||||||
|
*free = mem.dwFree;
|
||||||
|
|
||||||
|
return mem.ddRVal;
|
||||||
|
}
|
||||||
|
|
|
@ -352,7 +352,8 @@ HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDE
|
||||||
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));
|
||||||
|
|
||||||
|
@ -412,9 +413,18 @@ HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD d
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
LPDWORD total, LPDWORD free)
|
LPDWORD total, LPDWORD free)
|
||||||
{
|
{
|
||||||
|
DWORD ret;
|
||||||
DX_STUB;
|
|
||||||
|
if((ret = Hal_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free)) == DD_OK)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
if((ret = Hel_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free)) == DD_OK)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
|
return DDERR_NOTINITIALIZED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC hdc,
|
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC hdc,
|
||||||
|
|
|
@ -88,10 +88,18 @@ HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
|
||||||
HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
|
HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
|
||||||
VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
|
VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
|
||||||
|
|
||||||
|
HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
|
LPDWORD total, LPDWORD free);
|
||||||
|
|
||||||
|
|
||||||
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
|
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
|
||||||
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
|
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
|
||||||
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
|
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
|
||||||
|
|
||||||
|
HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
|
LPDWORD total, LPDWORD free);
|
||||||
|
|
||||||
|
|
||||||
/*********** Macros ***********/
|
/*********** Macros ***********/
|
||||||
|
|
||||||
#define DX_STUB \
|
#define DX_STUB \
|
||||||
|
|
|
@ -24,3 +24,10 @@ HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface)
|
||||||
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
|
LPDWORD total, LPDWORD free)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue