implement Hal GetScanLine
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
Modified: trunk/reactos/lib/ddraw/main/ddraw.c
Modified: trunk/reactos/lib/ddraw/main/surface.c
Modified: trunk/reactos/lib/ddraw/rosdraw.h
Modified: trunk/reactos/lib/ddraw/soft/ddraw.c
_____
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
--- trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-30 08:10:43 UTC (rev
18870)
+++ trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-30 08:41:19 UTC (rev
18871)
@@ -410,3 +410,26 @@
return WaitVectorData.ddRVal;
}
+
+HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine)
+{
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ DDHAL_GETSCANLINEDATA GetScan;
+
+ if
(!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags &
DDHAL_CB32_GETSCANLINE))
+ {
+ return DDERR_NODRIVERSUPPORT;
+ }
+
+ GetScan.lpDD = &This->DirectDrawGlobal;
+ GetScan.ddRVal = DDERR_NOTPALETTIZED;
+
+ if
(This->DirectDrawGlobal.lpDDCBtmp->HALDD.GetScanLine(&GetScan) !=
DDHAL_DRIVER_HANDLED)
+ {
+ return DDERR_NODRIVERSUPPORT;
+ }
+
+ *lpdwScanLine = GetScan.ddRVal;
+ return GetScan.ddRVal;
+}
_____
Modified: trunk/reactos/lib/ddraw/main/ddraw.c
--- trunk/reactos/lib/ddraw/main/ddraw.c 2005-10-30 08:10:43 UTC
(rev 18870)
+++ trunk/reactos/lib/ddraw/main/ddraw.c 2005-10-30 08:41:19 UTC
(rev 18871)
@@ -391,7 +391,15 @@
HRESULT WINAPI Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine)
{
- DX_STUB;
+ DWORD ret;
+
+ if((ret = Hal_DirectDraw_GetScanLine( iface, lpdwScanLine)) ==
DD_OK)
+ return ret;
+
+ if((ret = Hel_DirectDraw_GetScanLine( iface, lpdwScanLine)) ==
DD_OK)
+ return ret;
+
+ return DDERR_NOTINITIALIZED;
}
HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus(LPDIRECTDRAW7
iface, LPBOOL status)
@@ -407,7 +415,6 @@
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7
iface, DWORD dwFlags,
HANDLE h)
{
-
DWORD ret;
if((ret = Hal_DirectDraw_WaitForVerticalBlank( iface, dwFlags, h))
== DD_OK)
_____
Modified: trunk/reactos/lib/ddraw/main/surface.c
--- trunk/reactos/lib/ddraw/main/surface.c 2005-10-30 08:10:43 UTC
(rev 18870)
+++ trunk/reactos/lib/ddraw/main/surface.c 2005-10-30 08:41:19 UTC
(rev 18871)
@@ -81,7 +81,7 @@
CreateData.lplpSList = pLocal;
/* this is the call we were waiting for */
- if(CreateData.CreateSurface(&CreateData) ==
DDHAL_DRIVER_NOTHANDLED)
+
if(This->owner->DirectDrawGlobal.lpDDCBtmp->HALDD.CreateSurface(&CreateD
ata) == DDHAL_DRIVER_NOTHANDLED)
return DDERR_INVALIDPARAMS;
if(CreateData.ddRVal != DD_OK)
_____
Modified: trunk/reactos/lib/ddraw/rosdraw.h
--- trunk/reactos/lib/ddraw/rosdraw.h 2005-10-30 08:10:43 UTC (rev
18870)
+++ trunk/reactos/lib/ddraw/rosdraw.h 2005-10-30 08:41:19 UTC (rev
18871)
@@ -94,6 +94,7 @@
HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD
dwFlags,
HANDLE h);
+HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine);
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
@@ -106,8 +107,10 @@
HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD
dwFlags,
HANDLE h);
+HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine);
+
/*********** Macros ***********/
#define DX_STUB \
_____
Modified: trunk/reactos/lib/ddraw/soft/ddraw.c
--- trunk/reactos/lib/ddraw/soft/ddraw.c 2005-10-30 08:10:43 UTC
(rev 18870)
+++ trunk/reactos/lib/ddraw/soft/ddraw.c 2005-10-30 08:41:19 UTC
(rev 18871)
@@ -37,3 +37,8 @@
{
DX_STUB;
}
+
+HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine)
+{
+ DX_STUB;
+}