mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 15:53:39 +00:00
implement Hal WaitForVerticalBlank
svn path=/trunk/; revision=18868
This commit is contained in:
parent
e00d30c16e
commit
8e68e084ee
4 changed files with 57 additions and 7 deletions
|
@ -369,12 +369,13 @@ HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscap
|
||||||
}
|
}
|
||||||
|
|
||||||
mem.lpDD = &This->DirectDrawGlobal;
|
mem.lpDD = &This->DirectDrawGlobal;
|
||||||
|
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;
|
||||||
|
@ -384,3 +385,30 @@ HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscap
|
||||||
|
|
||||||
return mem.ddRVal;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -408,7 +408,15 @@ HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD d
|
||||||
HANDLE h)
|
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,
|
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||||
|
|
|
@ -91,6 +91,10 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
|
||||||
HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
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);
|
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
|
||||||
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
|
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
|
||||||
|
@ -99,6 +103,10 @@ VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
|
||||||
HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
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 ***********/
|
/*********** Macros ***********/
|
||||||
|
|
||||||
|
|
|
@ -31,3 +31,9 @@ HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscap
|
||||||
{
|
{
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,HANDLE h)
|
||||||
|
{
|
||||||
|
DX_STUB;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue