https://git.reactos.org/?p=reactos.git;a=commitdiff;h=22d8c0fd541eaf92b3462ae1d252cdbba16e30db
commit 22d8c0fd541eaf92b3462ae1d252cdbba16e30db Author: Hervé Poussineau <hpous...@reactos.org> AuthorDate: Mon Sep 26 23:41:47 2022 +0200 Commit: Hervé Poussineau <hpous...@reactos.org> CommitDate: Mon Sep 26 23:45:56 2022 +0200 [FRAMEBUF] Implement required DirectDraw functions However, do not support any optional callback. dxdiag now accepts to run DirectDraw tests. --- win32ss/drivers/displays/framebuf/enable.c | 38 +++++++++++++++++++++++++++- win32ss/drivers/displays/framebuf/framebuf.h | 11 ++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/win32ss/drivers/displays/framebuf/enable.c b/win32ss/drivers/displays/framebuf/enable.c index 3bd273bf916..04fc1b71c6e 100644 --- a/win32ss/drivers/displays/framebuf/enable.c +++ b/win32ss/drivers/displays/framebuf/enable.c @@ -31,10 +31,46 @@ static DRVFN DrvFunctionTable[] = {INDEX_DrvGetModes, (PFN)DrvGetModes}, {INDEX_DrvSetPalette, (PFN)DrvSetPalette}, {INDEX_DrvSetPointerShape, (PFN)DrvSetPointerShape}, - {INDEX_DrvMovePointer, (PFN)DrvMovePointer} + {INDEX_DrvMovePointer, (PFN)DrvMovePointer}, + {INDEX_DrvEnableDirectDraw, (PFN)DrvEnableDirectDraw}, + {INDEX_DrvDisableDirectDraw, (PFN)DrvDisableDirectDraw}, }; +/* + * DrvEnableDirectDraw + */ + +BOOL APIENTRY +DrvEnableDirectDraw( + DHPDEV dhpdev, + DD_CALLBACKS *pCallbacks, + DD_SURFACECALLBACKS *pSurfaceCallbacks, + DD_PALETTECALLBACKS *pPaletteCallbacks) +{ + RtlZeroMemory(pCallbacks, sizeof(*pCallbacks)); + RtlZeroMemory(pSurfaceCallbacks, sizeof(*pSurfaceCallbacks)); + RtlZeroMemory(pPaletteCallbacks, sizeof(*pPaletteCallbacks)); + + pCallbacks->dwSize = sizeof(*pCallbacks); + pSurfaceCallbacks->dwSize = sizeof(*pSurfaceCallbacks); + pPaletteCallbacks->dwSize = sizeof(*pPaletteCallbacks); + + /* We don't support any optional callback */ + + return TRUE; +} + +/* + * DrvDisableDirectDraw + */ + +VOID APIENTRY +DrvDisableDirectDraw( + DHPDEV dhpdev) +{ +} + /* * DrvEnableDriver * diff --git a/win32ss/drivers/displays/framebuf/framebuf.h b/win32ss/drivers/displays/framebuf/framebuf.h index 9d01f49d047..8a8046f7302 100644 --- a/win32ss/drivers/displays/framebuf/framebuf.h +++ b/win32ss/drivers/displays/framebuf/framebuf.h @@ -71,6 +71,17 @@ typedef struct _PDEV #define ALLOC_TAG 'FUBF' +BOOL APIENTRY +DrvEnableDirectDraw( + DHPDEV dhpdev, + DD_CALLBACKS *pCallbacks, + DD_SURFACECALLBACKS *pSurfaceCallbacks, + DD_PALETTECALLBACKS *pPaletteCallbacks); + +VOID APIENTRY +DrvDisableDirectDraw( + DHPDEV dhpdev); + DHPDEV APIENTRY DrvEnablePDEV( IN DEVMODEW *pdm,