mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 15:51:49 +00:00
Fixed the last regress I intdues for loading ms dxg.sys now it works loading again and we come allot futuer with our ddraw.dll.
without using hacks. svn path=/trunk/; revision=33249
This commit is contained in:
parent
21767c48f6
commit
028236f96f
2 changed files with 11 additions and 10 deletions
|
@ -34,8 +34,8 @@ intEnableReactXDriver(HDC hdc)
|
|||
NTSTATUS Status;
|
||||
PEPROCESS Proc = NULL;
|
||||
PDC pDC = NULL;
|
||||
PGDIDEVICE pDev = (PGDIDEVICE)pDC->pPDev;
|
||||
PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = (PGD_DXDDENABLEDIRECTDRAW)gpDxFuncs[DXG_INDEX_DxDdEnableDirectDraw].pfn;
|
||||
PGDIDEVICE pDev = NULL;
|
||||
PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = NULL;
|
||||
BOOL success = FALSE;
|
||||
|
||||
/* FIXME get the process data */
|
||||
|
@ -57,7 +57,9 @@ intEnableReactXDriver(HDC hdc)
|
|||
DPRINT1("Warning : Failed to lock hdc\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
pDev = (PGDIDEVICE)pDC->pPDev;
|
||||
|
||||
/* test see if drv got a dx interface or not */
|
||||
if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
|
||||
( pDev->DriverFunctions.EnableDirectDraw == NULL))
|
||||
|
@ -65,17 +67,16 @@ intEnableReactXDriver(HDC hdc)
|
|||
DPRINT1("Waring : DisableDirectDraw and EnableDirectDraw are NULL, no dx driver \n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME HACK : some how pEDDgpl got zero out */
|
||||
pDev->pEDDgpl = (PVOID)&edd_DdirectDraw_Global;
|
||||
|
||||
/* FIXME : proper check see if it been disable */
|
||||
if (pDev->pEDDgpl->dhpdev == 0)
|
||||
{
|
||||
|
||||
/* CHeck see if dx have been enable or not */
|
||||
if (pDev->pEDDgpl->hDev != pDC->pPDev)
|
||||
{
|
||||
pDev->pEDDgpl->ddCallbacks.dwSize = sizeof(DD_CALLBACKS);
|
||||
pDev->pEDDgpl->ddSurfaceCallbacks.dwSize = sizeof(DD_SURFACECALLBACKS);
|
||||
pDev->pEDDgpl->ddPaletteCallbacks.dwSize = sizeof(DD_PALETTECALLBACKS);
|
||||
|
||||
pfnDdEnableDirectDraw = (PGD_DXDDENABLEDIRECTDRAW)gpDxFuncs[DXG_INDEX_DxDdEnableDirectDraw].pfn;
|
||||
if (pfnDdEnableDirectDraw == NULL)
|
||||
{
|
||||
DPRINT1("Warning: no pfnDdEnableDirectDraw\n");
|
||||
|
|
|
@ -553,7 +553,7 @@ IntPrepareDriver()
|
|||
PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display drvs.
|
||||
PrimarySurface.ppdevParent = NULL; // Always NULL if primary.
|
||||
PrimarySurface.pGraphicsDev = NULL; // Fixme!
|
||||
PrimarySurface.pEDDgpl = (PVOID)&edd_DdirectDraw_Global; // FIXME! We need to support more than display drvs.
|
||||
PrimarySurface.pEDDgpl = (EDD_DIRECTDRAW_GLOBAL *)&edd_DdirectDraw_Global; // FIXME! We need to support more than display drvs.
|
||||
RtlZeroMemory( &edd_DdirectDraw_Global ,sizeof(EDD_DIRECTDRAW_GLOBAL));
|
||||
ret = TRUE;
|
||||
goto cleanup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue