[ros-diffs] [greatlrd] 14225: start add hardware interface to hal
greatlrd at svn.reactos.com
greatlrd at svn.reactos.com
Sun Mar 20 18:24:13 CET 2005
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.
Modified: trunk/reactos/lib/ddraw/ddraw_hal.c
_____
Modified: trunk/reactos/lib/ddraw/ddraw_hal.c
--- trunk/reactos/lib/ddraw/ddraw_hal.c 2005-03-20 17:22:24 UTC (rev
14224)
+++ trunk/reactos/lib/ddraw/ddraw_hal.c 2005-03-20 17:24:11 UTC (rev
14225)
@@ -37,9 +37,9 @@
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 hr;
- IDirectDrawImpl* This;
+ IDirectDrawImpl* This;
+ HDC desktop;
/*
This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
@@ -312,9 +313,15 @@
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;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050320/d9250153/attachment.html
More information about the Ros-diffs
mailing list