Faster moving mouse cursor

svn path=/trunk/; revision=1937
This commit is contained in:
Jason Filby 2001-06-02 08:44:46 +00:00
parent a9d9714a23
commit 4ce8aabb3c
3 changed files with 6 additions and 32 deletions

View file

@ -13,7 +13,7 @@ BOOL VGADDILineTo(SURFOBJ *Surface, CLIPOBJ *Clip, BRUSHOBJ *Brush,
ULONG x, y, d, i, length, xchange, ychange, error,
iSolidColor, hx, vy;
LONG deltax, deltay;
DbgPrint("drvlineto\n");
iSolidColor = Brush->iSolidColor; // FIXME: Brush Realization...
// FIXME: Implement clipping

View file

@ -131,7 +131,7 @@ void vgaShowCursor(PPDEV ppdev)
ppdev->pPointerAttributes->Width,
ppdev->pPointerAttributes->Height,
ppdev->pPointerAttributes->Pixels,
ppdev->pPointerAttributes->WidthInBytes);
ppdev->pPointerAttributes->WidthInBytes, 5);
ppdev->pPointerAttributes->Enable = 1;
}

View file

@ -504,10 +504,8 @@ void DFB_BltFromVGA(int x, int y, int w, int h, void *b, int bw)
ASSIGNMK4(x, y, maskP)
get_masks(x, w);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05); // read mode 0
saved_GC_mode = READ_PORT_UCHAR((PUCHAR)GRA_D);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x04); // read map select
saved_GC_rmap = READ_PORT_UCHAR((PUCHAR)GRA_D);
// clear buffer
bp=b;
@ -567,14 +565,8 @@ void DFB_BltFromVGA(int x, int y, int w, int h, void *b, int bw)
vpY += byte_per_line;
}
}
// reset GC register
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_rmap);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_mode);
}
void DFB_BltToVGA(int x, int y, int w, int h, void *b, int bw)
// This algorithm goes from goes from left to right, and inside that loop, top to bottom.
@ -591,14 +583,12 @@ void DFB_BltToVGA(int x, int y, int w, int h, void *b, int bw)
ASSIGNVP4(x, y, vpX)
ASSIGNMK4(x, y, mask)
byte_per_line = SCREEN_X >> 3;
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05); // write mode 2
saved_GC_mode = READ_PORT_UCHAR((PUCHAR)GRA_D);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03); // replace
saved_GC_fun = READ_PORT_UCHAR((PUCHAR)GRA_D);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x08); // bit mask
saved_GC_mask = READ_PORT_UCHAR((PUCHAR)GRA_D);
for (i=w; i>0; i--) {
WRITE_PORT_UCHAR((PUCHAR)GRA_D, mask);
@ -616,16 +606,9 @@ void DFB_BltToVGA(int x, int y, int w, int h, void *b, int bw)
mask = 0x80;
}
}
// reset GC register
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_mask);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_fun);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_mode);
}
void DFB_BltToVGA_Transparent(int x, int y, int w, int h, void *b, int bw)
void DFB_BltToVGA_Transparent(int x, int y, int w, int h, void *b, int bw, char Trans)
// This algorithm goes from goes from left to right, and inside that loop, top to bottom.
// It also stores each 4BPP pixel in an entire byte.
@ -641,21 +624,19 @@ void DFB_BltToVGA_Transparent(int x, int y, int w, int h, void *b, int bw)
ASSIGNVP4(x, y, vpX)
ASSIGNMK4(x, y, mask)
byte_per_line = SCREEN_X >> 3;
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05); // write mode 2
saved_GC_mode = READ_PORT_UCHAR((PUCHAR)GRA_D);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03); // replace
saved_GC_fun = READ_PORT_UCHAR((PUCHAR)GRA_D);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x08); // bit mask
saved_GC_mask = READ_PORT_UCHAR((PUCHAR)GRA_D);
for (i=w; i>0; i--) {
WRITE_PORT_UCHAR((PUCHAR)GRA_D, mask);
bp = bpX;
vp = vpX;
for (j=h; j>0; j--) {
if (*bp != 0)
if (*bp != Trans)
{
dummy = *vp;
*vp = *bp;
@ -669,13 +650,6 @@ void DFB_BltToVGA_Transparent(int x, int y, int w, int h, void *b, int bw)
mask = 0x80;
}
}
// reset GC register
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_mask);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_fun);
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, saved_GC_mode);
}
void DFB_BltToDIB(int x, int y, int w, int h, void *b, int bw, void *bdib, int dibw)