update for HEAD-2003050101
[reactos.git] / drivers / dd / vga / display / objects / bitblt.c
index 02fd0bc..30c7f8c 100644 (file)
@@ -15,7 +15,7 @@ DIBtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
   LONG i, j, dx, dy, alterx, altery, idxColor, RGBulong = 0, c8;
   BYTE  *GDIpos, *initial, *tMask, *lMask;
 
-  GDIpos = Source->pvBits;
+  GDIpos = Source->pvScan0;
 
   dx = DestRect->right  - DestRect->left;
   dy = DestRect->bottom - DestRect->top;
@@ -23,9 +23,10 @@ DIBtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
   alterx = abs(SourcePoint->x - DestRect->left);
   altery = abs(SourcePoint->y - DestRect->top);
 
-  if (ColorTranslation == NULL)
+  if (NULL == ColorTranslation)
     {
-      DIB_BltToVGA(DestRect->left, DestRect->top, dx, dy, Source->pvBits,
+      DIB_BltToVGA(DestRect->left, DestRect->top, dx, dy,
+                   Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1),
                   Source->lDelta);
     }
   else
@@ -369,8 +370,15 @@ DrvBitBlt(SURFOBJ *Dest,
                             BrushPoint, rop4));
 
     case SRCCOPY:
-      return(VGADDI_BltSrc(Dest, Source, ColorTranslation, DestRect,
-                          SourcePoint));
+      if (BMF_4BPP == Source->iBitmapFormat && BMF_4BPP == Dest->iBitmapFormat)
+        {
+       return(VGADDI_BltSrc(Dest, Source, ColorTranslation, DestRect,
+                            SourcePoint));
+       }
+      else
+       {
+       return FALSE;
+       }
 
     case 0xAACC:
       return(VGADDI_BltMask(Dest, Mask, ColorTranslation, DestRect,