[FRAMEBUF] Implement required DirectDraw functions

However, do not support any optional callback.

dxdiag now accepts to run DirectDraw tests.
This commit is contained in:
Hervé Poussineau 2022-09-26 23:41:47 +02:00
parent 06b3ee43c2
commit 22d8c0fd54
2 changed files with 48 additions and 1 deletions

View File

@ -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
*

View File

@ -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,