mirror of
https://github.com/reactos/reactos.git
synced 2024-11-07 15:10:53 +00:00
setup almost all info it need in DrvGetDirectDrawInfo, left todo is the rop table.
and debugging see if everything went right. it is eunght for me continue on next step in debugging svn path=/trunk/; revision=23155
This commit is contained in:
parent
353c1f9a6e
commit
55b8810a2b
3 changed files with 47 additions and 9 deletions
|
@ -55,6 +55,8 @@ DrvEnableDirectDraw(
|
|||
ppdev->ddpfDisplay.dwRGBAlphaBitMask = 0;
|
||||
ppdev->ddpfDisplay.dwFlags = DDPF_RGB;
|
||||
|
||||
ppdev->pvmList = NULL;
|
||||
|
||||
switch(ppdev->iDitherFormat)
|
||||
{
|
||||
case BMF_8BPP:
|
||||
|
@ -135,8 +137,10 @@ DrvGetDirectDrawInfo(
|
|||
OUT DWORD *pdwFourCC)
|
||||
{
|
||||
PPDEV ppdev = (PPDEV)dhpdev;
|
||||
int i;
|
||||
|
||||
LONG i;
|
||||
DWORD heap = 1; /* we always alloc one heap */
|
||||
BOOL bDDrawHeap = FALSE;
|
||||
|
||||
if (ppdev == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
@ -152,11 +156,21 @@ DrvGetDirectDrawInfo(
|
|||
|
||||
if (pdwNumFourCCCodes == NULL)
|
||||
return FALSE;
|
||||
|
||||
/* rest some data */
|
||||
|
||||
/* Setup heap */
|
||||
if ( (ppdev->ScreenWidth < ppdev->MemWidth) || (ppdev->ScreenHeight < ppdev->MemHeight))
|
||||
{
|
||||
bDDrawHeap = TRUE;
|
||||
heap++;
|
||||
}
|
||||
|
||||
ppdev->dwHeap = heap;
|
||||
*pdwNumHeaps = heap;
|
||||
|
||||
/* We do not support other fourcc */
|
||||
*pdwNumFourCCCodes = 0;
|
||||
*pdwNumHeaps = 0;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
check see if pvmList and pdwFourCC are frist call
|
||||
or frist. Secon call we fill in pHalInfo info
|
||||
|
@ -218,8 +232,28 @@ DrvGetDirectDrawInfo(
|
|||
}
|
||||
}
|
||||
|
||||
/* Now fix the memory alloc and other stuff */
|
||||
|
||||
/* Now build pvmList info */
|
||||
if(pvmList)
|
||||
{
|
||||
ppdev->pvmList = pvmList;
|
||||
|
||||
if ( bDDrawHeap == TRUE)
|
||||
{
|
||||
pvmList->dwFlags = VIDMEM_ISLINEAR ;
|
||||
pvmList->fpStart = ppdev->ScreenHeight * ppdev->ScreenDelta;
|
||||
pvmList->fpEnd = ppdev->MemHeight * ppdev->ScreenDelta - 1;
|
||||
pvmList->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
||||
pvmList++;
|
||||
}
|
||||
|
||||
pvmList->fpStart = 0;
|
||||
pvmList->fpEnd = (ppdev->MemHeight * ppdev->ScreenDelta) - 1;
|
||||
pvmList->dwFlags = VIDMEM_ISNONLOCAL | VIDMEM_ISLINEAR | VIDMEM_ISWC;
|
||||
pvmList->ddsCaps.dwCaps = DDSCAPS_FRONTBUFFER | DDSCAPS_BACKBUFFER ;
|
||||
pvmList->ddsCapsAlt.dwCaps = DDSCAPS_FRONTBUFFER | DDSCAPS_BACKBUFFER;
|
||||
|
||||
pvmList = ppdev->pvmList;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -65,9 +65,12 @@ typedef struct _PDEV
|
|||
/* DirectX Support */
|
||||
DWORD iDitherFormat;
|
||||
ULONG MemHeight;
|
||||
ULONG MemWidth;
|
||||
DWORD dwHeap;
|
||||
VIDEOMEMORY* pvmList;
|
||||
BOOL bDDInitialized;
|
||||
DDPIXELFORMAT ddpfDisplay;
|
||||
DDHALINFO dxHalInfo;
|
||||
DDHALINFO dxHalInfo;
|
||||
} PDEV, *PPDEV;
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
|
|
|
@ -191,6 +191,7 @@ IntInitScreenInfo(
|
|||
ppdev->ScreenDelta = SelectedMode->ScreenStride;
|
||||
ppdev->BitsPerPixel = SelectedMode->BitsPerPlane * SelectedMode->NumberOfPlanes;
|
||||
|
||||
ppdev->MemWidth = SelectedMode->VideoMemoryBitmapWidth;
|
||||
ppdev->MemHeight = SelectedMode->VideoMemoryBitmapHeight;
|
||||
|
||||
ppdev->RedMask = SelectedMode->RedMask;
|
||||
|
|
Loading…
Reference in a new issue