mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed DIB_BltToVGA and other functions calling it to handle situation where SourcePoint->x % 2 != 0.
svn path=/trunk/; revision=6147
This commit is contained in:
parent
95d5d55bff
commit
afd54f8f9c
3 changed files with 48 additions and 44 deletions
|
@ -38,6 +38,8 @@ static BOOL FASTCALL VGADDI_IntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
void DIB_BltToVGA_Fixed(int x, int y, int w, int h, void *b, int Source_lDelta, int mod);
|
||||
|
||||
BOOL
|
||||
DIBtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
|
||||
RECTL *DestRect, POINTL *SourcePoint)
|
||||
|
@ -51,7 +53,7 @@ DIBtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
|
|||
{
|
||||
DIB_BltToVGA(DestRect->left, DestRect->top, dx, dy,
|
||||
Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1),
|
||||
Source->lDelta);
|
||||
Source->lDelta, SourcePoint->x % 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -31,7 +31,8 @@ DrvCopyBits(OUT PSURFOBJ DestObj,
|
|||
DIB_BltToVGA(DestRectL->left, DestRectL->top,
|
||||
DestRectL->right - DestRectL->left,
|
||||
DestRectL->bottom - DestRectL->top,
|
||||
SourceObj->pvScan0, SourceObj->lDelta);
|
||||
SourceObj->pvScan0, SourceObj->lDelta,
|
||||
0);
|
||||
Done = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -528,7 +528,7 @@ void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
|
|||
#endif
|
||||
|
||||
/* DIB blt to the VGA. */
|
||||
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta)
|
||||
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod)
|
||||
{
|
||||
PBYTE pb, opb = b;
|
||||
ULONG i, j;
|
||||
|
@ -545,7 +545,7 @@ void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta)
|
|||
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x08); // set the mask
|
||||
WRITE_PORT_UCHAR((PUCHAR)GRA_D, maskbit[i]);
|
||||
|
||||
if (0 == ((i - x) % 2))
|
||||
if (StartMod == ((i - x) % 2))
|
||||
{
|
||||
for (j = y; j < y2; j++)
|
||||
{
|
||||
|
@ -566,13 +566,14 @@ void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta)
|
|||
}
|
||||
}
|
||||
|
||||
if (0 != ((i - x) % 2))
|
||||
if (StartMod != ((i - x) % 2))
|
||||
{
|
||||
opb++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* DIB blt to the VGA. */
|
||||
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, PXLATEOBJ Xlate)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue