Author: greatlrd Date: Tue Dec 7 19:13:38 2010 New Revision: 49977
URL: http://svn.reactos.org/svn/reactos?rev=49977&view=rev Log: using s3virge windows 2000 ddk sample for refens to our own dx interface, the premida2 and premida3 dx example are very messy
Modified: branches/reactx/reactos/drivers/video/displays/framebuf/dd.c branches/reactx/reactos/drivers/video/displays/framebuf/enable.c branches/reactx/reactos/drivers/video/displays/framebuf/framebuf.h
Modified: branches/reactx/reactos/drivers/video/displays/framebuf/dd.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/drivers/video/dis... ============================================================================== --- branches/reactx/reactos/drivers/video/displays/framebuf/dd.c [iso-8859-1] (original) +++ branches/reactx/reactos/drivers/video/displays/framebuf/dd.c [iso-8859-1] Tue Dec 7 19:13:38 2010 @@ -24,7 +24,7 @@
DWORD CALLBACK -DdCanCreateSurface( LPDDHAL_CANCREATESURFACEDATA pccsd) +DdCanCreateSurface( PDD_CANCREATESURFACEDATA pccsd) { /* We do not needit if we need it here it is PPDEV ppdev=(PPDEV)pccsd->lpDD->dhpdev; @@ -38,7 +38,7 @@ }
/* We do not support texture yet so we fail here */ - if (pccsd->lplpSList[0]->lpSurfMore->ddsCapsEx.dwCaps2 & DDSCAPS2_TEXTUREMANAGE) + if (pccsd->lpDDSurfaceDesc->ddsCaps.dwCaps & DDSD_TEXTURESTAGE) { pccsd->ddRVal = DDERR_INVALIDPIXELFORMAT; } @@ -54,11 +54,10 @@ }
DWORD CALLBACK -DdCreateSurface( LPDDHAL_CREATESURFACEDATA pcsd ) +DdCreateSurface( PDD_CREATESURFACEDATA pcsd ) { - PPDEV pDev = (PPDEV)pcsd->lpDD->dhpdev; - DD_SURFACE_LOCAL* lpSurfaceLocal; - DD_SURFACE_GLOBAL* lpSurfaceGlobal; + PDD_SURFACE_LOCAL lpSurfaceLocal; + PDD_SURFACE_GLOBAL lpSurfaceGlobal; LPDDSURFACEDESC lpSurfaceDesc;
/* Driver DdCreateSurface should only support to create one surface not more that */ @@ -102,16 +101,16 @@ { /* We maybe should alloc it with EngAlloc for now we trusting ddraw alloc it */ - lpSurfaceGlobal->lpGbl->fpVidMem = 0; + lpSurfaceGlobal->fpVidMem = 0; } else { /* We maybe should alloc it with EngAlloc for now we trusting ddraw alloc it */
- lpSurfaceGlobal->lpGbl->fpVidMem = 0; + lpSurfaceGlobal->fpVidMem = 0;
- if ( (lpSurfaceLocal->lpSurfMore->ddsCapsEx.dwCaps2 & DDSCAPS2_TEXTUREMANAGE) && + if ( (lpSurfaceLocal->lpSurfMore->ddsCapsEx.dwCaps2 & DDSCAPS2_TEXTUREMANAGE) ) { if (lpSurfaceDesc->dwFlags & DDSD_PIXELFORMAT) {
Modified: branches/reactx/reactos/drivers/video/displays/framebuf/enable.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/drivers/video/dis... ============================================================================== --- branches/reactx/reactos/drivers/video/displays/framebuf/enable.c [iso-8859-1] (original) +++ branches/reactx/reactos/drivers/video/displays/framebuf/enable.c [iso-8859-1] Tue Dec 7 19:13:38 2010 @@ -24,16 +24,20 @@
static DRVFN DrvFunctionTable[] = { - {INDEX_DrvEnablePDEV, (PFN)DrvEnablePDEV}, - {INDEX_DrvCompletePDEV, (PFN)DrvCompletePDEV}, - {INDEX_DrvDisablePDEV, (PFN)DrvDisablePDEV}, - {INDEX_DrvEnableSurface, (PFN)DrvEnableSurface}, - {INDEX_DrvDisableSurface, (PFN)DrvDisableSurface}, - {INDEX_DrvAssertMode, (PFN)DrvAssertMode}, - {INDEX_DrvGetModes, (PFN)DrvGetModes}, - {INDEX_DrvSetPalette, (PFN)DrvSetPalette}, - {INDEX_DrvSetPointerShape, (PFN)DrvSetPointerShape}, - {INDEX_DrvMovePointer, (PFN)DrvMovePointer} + { INDEX_DrvEnablePDEV, (PFN) DrvEnablePDEV}, + { INDEX_DrvCompletePDEV, (PFN) DrvCompletePDEV}, + { INDEX_DrvDisablePDEV, (PFN) DrvDisablePDEV}, + { INDEX_DrvEnableSurface, (PFN) DrvEnableSurface}, + { INDEX_DrvDisableSurface, (PFN) DrvDisableSurface}, + { INDEX_DrvAssertMode, (PFN) DrvAssertMode}, + { INDEX_DrvGetModes, (PFN) DrvGetModes}, + { INDEX_DrvSetPalette, (PFN) DrvSetPalette}, + { INDEX_DrvSetPointerShape, (PFN) DrvSetPointerShape}, + { INDEX_DrvMovePointer, (PFN) DrvMovePointer}, + { INDEX_DrvMovePointer, (PFN) DrvMovePointer}, + { INDEX_DrvGetDirectDrawInfo, (PFN) DrvGetDirectDrawInfo}, + { INDEX_DrvEnableDirectDraw, (PFN) DrvEnableDirectDraw}, + { INDEX_DrvDisableDirectDraw, (PFN) DrvDisableDirectDraw},
};
Modified: branches/reactx/reactos/drivers/video/displays/framebuf/framebuf.h URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/drivers/video/dis... ============================================================================== --- branches/reactx/reactos/drivers/video/displays/framebuf/framebuf.h [iso-8859-1] (original) +++ branches/reactx/reactos/drivers/video/displays/framebuf/framebuf.h [iso-8859-1] Tue Dec 7 19:13:38 2010 @@ -79,10 +79,10 @@ #define ALLOC_TAG 'FUBF'
DWORD CALLBACK -DdCanCreateSurface( LPDDHAL_CANCREATESURFACEDATA pccsd ); +DdCanCreateSurface( PDD_CANCREATESURFACEDATA pccsd );
DWORD CALLBACK -DdCreateSurface( LPDDHAL_CREATESURFACEDATA pcsd); +DdCreateSurface( PDD_CREATESURFACEDATA pcsd);
DWORD CALLBACK DdMapMemory(PDD_MAPMEMORYDATA lpMapMemory);