--- trunk/reactos/lib/ddraw/hal/surface_hal.c 2005-10-30 10:58:53 UTC (rev 18878)
+++ trunk/reactos/lib/ddraw/hal/surface_hal.c 2005-10-30 12:53:32 UTC (rev 18879)
@@ -9,3 +9,31 @@
*/
#include "rosdraw.h"
+
+HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
+ LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
+{
+
+ DDHAL_BLTDATA BltData;
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDDSurface.dwFlags & DDHAL_SURFCB32_BLT))
+ {
+ return DDERR_NODRIVERSUPPORT;
+ }
+
+ BltData.lpDD = &This->DirectDrawGlobal;
+ /* RtlCopyMemory( &BltData.bltFX, lpbltfx,sizeof(DDBLTFX)); */
+ BltData.dwFlags = dwFlags;
+
+ /* FIXME blt is not complete */
+
+ if (This->DirectDrawGlobal.lpDDCBtmp->HALDDSurface.Blt(&BltData) != DDHAL_DRIVER_HANDLED)
+ {
+ return DDERR_NODRIVERSUPPORT;
+ }
+
+ return BltData.ddRVal;
+
+}
+
--- trunk/reactos/lib/ddraw/main/surface_main.c 2005-10-30 10:58:53 UTC (rev 18878)
+++ trunk/reactos/lib/ddraw/main/surface_main.c 2005-10-30 12:53:32 UTC (rev 18879)
@@ -126,9 +126,17 @@
HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
{
- DX_STUB;
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE)
+ {
+ return Hal_DDrawSurface_Blt( iface, rdst, src, rsrc, dwFlags, lpbltfx);
+ }
+
+ return Hel_DDrawSurface_Blt( iface, rdst, src, rsrc, dwFlags, lpbltfx);
}
+
HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
LPDDSURFACEDESC2 pDDSD, DWORD flags, HANDLE event)
{
--- trunk/reactos/lib/ddraw/rosdraw.h 2005-10-30 10:58:53 UTC (rev 18878)
+++ trunk/reactos/lib/ddraw/rosdraw.h 2005-10-30 12:53:32 UTC (rev 18879)
@@ -84,41 +84,27 @@
/********* Prototypes **********/
-HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
-HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
-VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
+HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 );
+HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
+VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 );
+HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7, LPDDSCAPS2, LPDWORD, LPDWORD );
+HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
+HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
+HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
+HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7, DWORD, DWORD, DWORD, DWORD, DWORD );
+HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
-HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
- LPDWORD total, LPDWORD free);
-HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
- HANDLE h);
+HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 );
+HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
+VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 );
+HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 , LPDDSCAPS2 ddsaps, LPDWORD , LPDWORD );
+HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
+HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
+HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
+HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 , DWORD , DWORD ,DWORD , DWORD , DWORD );
+HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
-HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine);
-HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface);
-HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
- DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags);
-
-
-
-
-
-HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
-HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
-VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
-
-HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
- LPDWORD total, LPDWORD free);
-
-HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
- HANDLE h);
-
-HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine);
-HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface);
-HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
- DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags);
-
-
/*********** Macros ***********/
#define DX_STUB \
--- trunk/reactos/lib/ddraw/soft/surface_hel.c 2005-10-30 10:58:53 UTC (rev 18878)
+++ trunk/reactos/lib/ddraw/soft/surface_hel.c 2005-10-30 12:53:32 UTC (rev 18879)
@@ -9,3 +9,9 @@
*/
#include "rosdraw.h"
+
+HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
+ LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
+{
+ DX_STUB;
+}