mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:45:50 +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.dwRGBAlphaBitMask = 0;
|
||||||
ppdev->ddpfDisplay.dwFlags = DDPF_RGB;
|
ppdev->ddpfDisplay.dwFlags = DDPF_RGB;
|
||||||
|
|
||||||
|
ppdev->pvmList = NULL;
|
||||||
|
|
||||||
switch(ppdev->iDitherFormat)
|
switch(ppdev->iDitherFormat)
|
||||||
{
|
{
|
||||||
case BMF_8BPP:
|
case BMF_8BPP:
|
||||||
|
@ -135,8 +137,10 @@ DrvGetDirectDrawInfo(
|
||||||
OUT DWORD *pdwFourCC)
|
OUT DWORD *pdwFourCC)
|
||||||
{
|
{
|
||||||
PPDEV ppdev = (PPDEV)dhpdev;
|
PPDEV ppdev = (PPDEV)dhpdev;
|
||||||
int i;
|
LONG i;
|
||||||
|
DWORD heap = 1; /* we always alloc one heap */
|
||||||
|
BOOL bDDrawHeap = FALSE;
|
||||||
|
|
||||||
if (ppdev == NULL)
|
if (ppdev == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -152,11 +156,21 @@ DrvGetDirectDrawInfo(
|
||||||
|
|
||||||
if (pdwNumFourCCCodes == NULL)
|
if (pdwNumFourCCCodes == NULL)
|
||||||
return FALSE;
|
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;
|
*pdwNumFourCCCodes = 0;
|
||||||
*pdwNumHeaps = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
check see if pvmList and pdwFourCC are frist call
|
check see if pvmList and pdwFourCC are frist call
|
||||||
or frist. Secon call we fill in pHalInfo info
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,12 @@ typedef struct _PDEV
|
||||||
/* DirectX Support */
|
/* DirectX Support */
|
||||||
DWORD iDitherFormat;
|
DWORD iDitherFormat;
|
||||||
ULONG MemHeight;
|
ULONG MemHeight;
|
||||||
|
ULONG MemWidth;
|
||||||
|
DWORD dwHeap;
|
||||||
|
VIDEOMEMORY* pvmList;
|
||||||
BOOL bDDInitialized;
|
BOOL bDDInitialized;
|
||||||
DDPIXELFORMAT ddpfDisplay;
|
DDPIXELFORMAT ddpfDisplay;
|
||||||
DDHALINFO dxHalInfo;
|
DDHALINFO dxHalInfo;
|
||||||
} PDEV, *PPDEV;
|
} PDEV, *PPDEV;
|
||||||
|
|
||||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
#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->ScreenDelta = SelectedMode->ScreenStride;
|
||||||
ppdev->BitsPerPixel = SelectedMode->BitsPerPlane * SelectedMode->NumberOfPlanes;
|
ppdev->BitsPerPixel = SelectedMode->BitsPerPlane * SelectedMode->NumberOfPlanes;
|
||||||
|
|
||||||
|
ppdev->MemWidth = SelectedMode->VideoMemoryBitmapWidth;
|
||||||
ppdev->MemHeight = SelectedMode->VideoMemoryBitmapHeight;
|
ppdev->MemHeight = SelectedMode->VideoMemoryBitmapHeight;
|
||||||
|
|
||||||
ppdev->RedMask = SelectedMode->RedMask;
|
ppdev->RedMask = SelectedMode->RedMask;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue