implment Hal FlipToGDISurface
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
Modified: trunk/reactos/lib/ddraw/main/ddraw.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:46:46 UTC (rev
18872)
+++ trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-30 09:21:03 UTC (rev
18873)
@@ -393,7 +393,7 @@
DDHAL_WAITFORVERTICALBLANKDATA WaitVectorData;
- if
(!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags &
DDHAL_CB32_WAITFORVERTICALBLANK))
+ if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_WAITFORVERTICALBLANK))
{
return DDERR_NODRIVERSUPPORT;
}
@@ -417,7 +417,7 @@
DDHAL_GETSCANLINEDATA GetScan;
- if
(!(This->DirectDrawGlobal.lpDDCBtmp->HALDDMiscellaneous.dwFlags &
DDHAL_CB32_GETSCANLINE))
+ if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_GETSCANLINE))
{
return DDERR_NODRIVERSUPPORT;
}
@@ -433,3 +433,26 @@
*lpdwScanLine = GetScan.ddRVal;
return GetScan.ddRVal;
}
+
+HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
+{
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ DDHAL_FLIPTOGDISURFACEDATA FlipGdi;
+
+ if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_FLIPTOGDISURFACE))
+ {
+ return DDERR_NODRIVERSUPPORT;
+ }
+
+ FlipGdi.lpDD = &This->DirectDrawGlobal;
+ FlipGdi.ddRVal = DDERR_NOTPALETTIZED;
+
+ if
(This->DirectDrawGlobal.lpDDCBtmp->HALDD.FlipToGDISurface(&FlipGdi) !=
DDHAL_DRIVER_HANDLED)
+ {
+ return DDERR_NODRIVERSUPPORT;
+ }
+
+ /* FIXME where should FlipGdi.dwToGDI be fill in */
+ return FlipGdi.ddRVal;
+}
_____
Modified: trunk/reactos/lib/ddraw/main/ddraw.c
--- trunk/reactos/lib/ddraw/main/ddraw.c 2005-10-30 08:46:46 UTC
(rev 18872)
+++ trunk/reactos/lib/ddraw/main/ddraw.c 2005-10-30 09:21:03 UTC
(rev 18873)
@@ -287,7 +287,15 @@
HRESULT WINAPI Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
{
- DX_STUB;
+ DWORD ret;
+
+ if((ret = Hal_DirectDraw_FlipToGDISurface( iface)) == DD_OK)
+ return ret;
+
+ if((ret = Hel_DirectDraw_FlipToGDISurface( iface)) == DD_OK)
+ return ret;
+
+ return DDERR_NOTINITIALIZED;
}
HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS
pDriverCaps,
_____
Modified: trunk/reactos/lib/ddraw/rosdraw.h
--- trunk/reactos/lib/ddraw/rosdraw.h 2005-10-30 08:46:46 UTC (rev
18872)
+++ trunk/reactos/lib/ddraw/rosdraw.h 2005-10-30 09:21:03 UTC (rev
18873)
@@ -95,8 +95,11 @@
HANDLE h);
HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine);
+HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface);
+
+
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
@@ -108,9 +111,9 @@
HANDLE h);
HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine);
+HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface);
-
/*********** Macros ***********/
#define DX_STUB \
_____
Modified: trunk/reactos/lib/ddraw/soft/ddraw.c
--- trunk/reactos/lib/ddraw/soft/ddraw.c 2005-10-30 08:46:46 UTC
(rev 18872)
+++ trunk/reactos/lib/ddraw/soft/ddraw.c 2005-10-30 09:21:03 UTC
(rev 18873)
@@ -42,3 +42,9 @@
{
DX_STUB;
}
+
+HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
+{
+ DX_STUB;
+}
+
Show replies by date