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:
parent
32d8034f77
commit
3b30feba45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346761
@ -105,24 +105,11 @@ static volatile sig_atomic_t VGLMsuppressint;
|
|||||||
void
|
void
|
||||||
VGLMousePointerShow()
|
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) {
|
if (!VGLMouseVisible) {
|
||||||
INTOFF();
|
INTOFF();
|
||||||
VGLMouseVisible = 1;
|
VGLMouseVisible = 1;
|
||||||
buffer.PixelBytes = VGLDisplay->PixelBytes;
|
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
|
||||||
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
|
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, -MOUSE_IMG_SIZE);
|
||||||
&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);
|
|
||||||
INTON();
|
INTON();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user