Author: greatlrd
Date: Wed Jul 19 03:56:48 2006
New Revision: 23162
URL:
http://svn.reactos.org/svn/reactos?rev=23162&view=rev
Log:
framebuf
Implement DdCreateSurface not tested.
Bugfix the prototyped.
Modified:
trunk/reactos/drivers/video/displays/framebuf/dd.c
trunk/reactos/drivers/video/displays/framebuf/framebuf.h
Modified: trunk/reactos/drivers/video/displays/framebuf/dd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/dd.c (original)
+++ trunk/reactos/drivers/video/displays/framebuf/dd.c Wed Jul 19 03:56:48 2006
@@ -68,9 +68,49 @@
}
DWORD CALLBACK
-DdCreateSurface(PDD_CREATESURFACEDATA lpCreateSurface)
+DdCreateSurface(LPDDHAL_CREATESURFACEDATA pcsd)
{
- lpCreateSurface->ddRVal = DDERR_GENERIC;
- return DDHAL_DRIVER_NOTHANDLED;
+ int i;
+
+ if (pcsd->dwSCnt == 1)
+ {
+ pcsd->ddRVal = DDERR_GENERIC;
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+
+ for (i=0; i<(int)pcsd->dwSCnt; i++)
+ {
+ pcsd->lplpSList[i]->lpGbl->lPitch =
(DWORD)(pcsd->lplpSList[i]->lpGbl->wWidth *
+
(pcsd->lplpSList[i]->lpGbl->ddpfSurface.dwRGBBitCount / 8));
+
+ pcsd->lplpSList[i]->lpGbl->dwBlockSizeX =
pcsd->lplpSList[i]->lpGbl->lPitch *
+
(DWORD)(pcsd->lplpSList[i]->lpGbl->wHeight);
+
+ pcsd->lplpSList[i]->lpGbl->dwBlockSizeY = 1;
+
+ if ( pcsd->lplpSList[i] ->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
+ {
+ /* We maybe should alloc it with EngAlloc
+ for now we trusting ddraw alloc it */
+ pcsd->lplpSList[i]->lpGbl->fpVidMem = 0;
+ }
+ else
+ {
+
+ /* We maybe should alloc it with EngAlloc
+ for now we trusting ddraw alloc it */
+ pcsd->lplpSList[i]->lpGbl->fpVidMem = DDHAL_PLEASEALLOC_BLOCKSIZE;
+ }
+
+ pcsd->lpDDSurfaceDesc->lPitch =
pcsd->lplpSList[i]->lpGbl->lPitch;
+ pcsd->lpDDSurfaceDesc->dwFlags |= DDSD_PITCH;
+
+ } // for i
+
+
+
+ pcsd->ddRVal = DD_OK;
+ return DDHAL_DRIVER_HANDLED;
}
Modified: trunk/reactos/drivers/video/displays/framebuf/framebuf.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/framebuf.h (original)
+++ trunk/reactos/drivers/video/displays/framebuf/framebuf.h Wed Jul 19 03:56:48 2006
@@ -82,7 +82,7 @@
DdCanCreateSurface( LPDDHAL_CANCREATESURFACEDATA pccsd );
DWORD CALLBACK
-DdCreateSurface(PDD_CREATESURFACEDATA lpCreateSurface);
+DdCreateSurface(LPDDHAL_CREATESURFACEDATA pcsd);
VOID STDCALL
DrvDisableDirectDraw(