Use __VGLBitmapCopy() directly to show the mouse cursor. The mouse

cursor must be merged with the shadow buffer on the way to the screen,
and __VGLBitmapCopy() now has an option to do exactly that.  This is
insignificantly less efficient.
This commit is contained in:
Bruce Evans 2019-04-26 18:28:54 +00:00
parent 32d8034f77
commit 3b30feba45
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346761

View File

@ -105,24 +105,11 @@ static volatile sig_atomic_t VGLMsuppressint;
void
VGLMousePointerShow()
{
byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4];
VGLBitmap buffer =
VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf);
int pos;
if (!VGLMouseVisible) {
INTOFF();
VGLMouseVisible = 1;
buffer.PixelBytes = VGLDisplay->PixelBytes;
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
&buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
for (pos = 0; pos < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++)
if (VGLMouseAndMask->Bitmap[pos])
bcopy(&VGLMouseOrMask->Bitmap[pos*VGLDisplay->PixelBytes],
&buffer.Bitmap[pos*VGLDisplay->PixelBytes],
VGLDisplay->PixelBytes);
__VGLBitmapCopy(&buffer, 0, 0, VGLDisplay,
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, -MOUSE_IMG_SIZE);
INTON();
}
}