mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
start add hardware interface to hal
we now map the hal to directdraw follow api are implement in the ddraw for hal but all hal api are not implement in the kernel if you got louky it maby working with nvida driver now. untested yet. svn path=/trunk/; revision=14225
This commit is contained in:
parent
bab510233f
commit
08482c30b1
1 changed files with 12 additions and 5 deletions
|
@ -37,9 +37,9 @@ HRESULT HAL_DirectDraw_Construct(IDirectDrawImpl *This, BOOL ex)
|
|||
|
||||
This->create_primary = HAL_DirectDraw_create_primary;
|
||||
This->create_backbuffer = HAL_DirectDraw_create_backbuffer;
|
||||
This->create_texture = HAL_DirectDraw_create_texture;
|
||||
This->create_texture = HAL_DirectDraw_create_texture;
|
||||
|
||||
ICOM_INIT_INTERFACE(This, IDirectDraw7, HAL_DirectDraw_VTable);
|
||||
// ICOM_INIT_INTERFACE(This, IDirectDraw7, HAL_DirectDraw_VTable);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,8 @@ HRESULT WINAPI HAL_DirectDraw_Create(const GUID* pGUID, LPDIRECTDRAW7* pIface,
|
|||
{
|
||||
|
||||
HRESULT hr;
|
||||
IDirectDrawImpl* This;
|
||||
IDirectDrawImpl* This;
|
||||
HDC desktop;
|
||||
|
||||
/*
|
||||
This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
|
@ -312,8 +313,14 @@ HRESULT WINAPI HAL_DirectDraw_Create(const GUID* pGUID, LPDIRECTDRAW7* pIface,
|
|||
hr = HAL_DirectDraw_Construct(This, ex);
|
||||
if (FAILED(hr))
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
else
|
||||
*pIface = ICOM_INTERFACE(This, IDirectDraw7);
|
||||
else *pIface = ICOM_INTERFACE(This, IDirectDraw7);
|
||||
|
||||
/* 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. */
|
||||
|
||||
desktop = GetWindowDC(GetDesktopWindow());
|
||||
*pIface = OsThunkDdCreateDirectDrawObject(desktop);
|
||||
if (pIface == NULL) hr == DDERR_NODIRECTDRAWHW;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue