implement Hal WaitForVerticalBlank

svn path=/trunk/; revision=18868
This commit is contained in:
Magnus Olsen 2005-10-30 07:41:33 +00:00
parent e00d30c16e
commit 8e68e084ee
4 changed files with 57 additions and 7 deletions

View file

@ -369,18 +369,46 @@ HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscap
}
mem.lpDD = &This->DirectDrawGlobal;
mem.ddRVal = DDERR_NOTPALETTIZED;
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;
}
HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,HANDLE h)
{
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
DDHAL_WAITFORVERTICALBLANKDATA WaitVectorData;
if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK))
{
return DDERR_NODRIVERSUPPORT;
}
WaitVectorData.lpDD = &This->DirectDrawGlobal;
WaitVectorData.dwFlags = dwFlags;
WaitVectorData.hEvent = (DWORD)h;
WaitVectorData.ddRVal = DDERR_NOTPALETTIZED;
if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.WaitForVerticalBlank(&WaitVectorData) != DDHAL_DRIVER_HANDLED)
{
return DDERR_NODRIVERSUPPORT;
}
return WaitVectorData.ddRVal;
return DD_OK;
}

View file

@ -407,8 +407,16 @@ HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface)
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
HANDLE h)
{
DX_STUB;
DWORD ret;
if((ret = Hal_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h)) == DD_OK)
return ret;
if((ret = Hel_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h)) == DD_OK)
return ret;
return DDERR_NOTINITIALIZED;
}
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
@ -416,7 +424,7 @@ HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS
{
DWORD ret;
if((ret = Hal_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free)) == DD_OK)
if((ret = Hal_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free)) == DD_OK)
return ret;
if((ret = Hel_DirectDraw_GetAvailableVidMem (iface,ddscaps,total,free)) == DD_OK)

View file

@ -89,7 +89,11 @@ HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
LPDWORD total, LPDWORD free);
LPDWORD total, LPDWORD free);
HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
HANDLE h);
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
@ -97,7 +101,11 @@ HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
LPDWORD total, LPDWORD free);
LPDWORD total, LPDWORD free);
HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
HANDLE h);
/*********** Macros ***********/

View file

@ -31,3 +31,9 @@ HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscap
{
DX_STUB;
}
HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,HANDLE h)
{
DX_STUB;
}