Remove save/restore of the crtc and gdc registers when showing and
hiding the mouse cursor. The showing and hiding is often done asynchronously in a not very safe signal handler, but the state of these registers and much more is protected from the signal handler in a better way by deferring mouse signals while the state is in use.
This commit is contained in:
parent
ea0a990509
commit
d05368940d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346747
@ -108,18 +108,11 @@ VGLMousePointerShow()
|
|||||||
byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4];
|
byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4];
|
||||||
VGLBitmap buffer =
|
VGLBitmap buffer =
|
||||||
VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf);
|
VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf);
|
||||||
byte crtcidx, crtcval, gdcidx, gdcval;
|
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
if (!VGLMouseVisible) {
|
if (!VGLMouseVisible) {
|
||||||
INTOFF();
|
INTOFF();
|
||||||
VGLMouseVisible = 1;
|
VGLMouseVisible = 1;
|
||||||
if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
|
|
||||||
crtcidx = inb(0x3c4);
|
|
||||||
crtcval = inb(0x3c5);
|
|
||||||
gdcidx = inb(0x3ce);
|
|
||||||
gdcval = inb(0x3cf);
|
|
||||||
}
|
|
||||||
buffer.PixelBytes = VGLDisplay->PixelBytes;
|
buffer.PixelBytes = VGLDisplay->PixelBytes;
|
||||||
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
|
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
|
||||||
&buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
&buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
||||||
@ -130,12 +123,6 @@ VGLMousePointerShow()
|
|||||||
VGLDisplay->PixelBytes);
|
VGLDisplay->PixelBytes);
|
||||||
__VGLBitmapCopy(&buffer, 0, 0, VGLDisplay,
|
__VGLBitmapCopy(&buffer, 0, 0, VGLDisplay,
|
||||||
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
||||||
if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
|
|
||||||
outb(0x3c4, crtcidx);
|
|
||||||
outb(0x3c5, crtcval);
|
|
||||||
outb(0x3ce, gdcidx);
|
|
||||||
outb(0x3cf, gdcval);
|
|
||||||
}
|
|
||||||
INTON();
|
INTON();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,25 +130,11 @@ VGLMousePointerShow()
|
|||||||
void
|
void
|
||||||
VGLMousePointerHide()
|
VGLMousePointerHide()
|
||||||
{
|
{
|
||||||
byte crtcidx, crtcval, gdcidx, gdcval;
|
|
||||||
|
|
||||||
if (VGLMouseVisible) {
|
if (VGLMouseVisible) {
|
||||||
INTOFF();
|
INTOFF();
|
||||||
VGLMouseVisible = 0;
|
VGLMouseVisible = 0;
|
||||||
if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
|
|
||||||
crtcidx = inb(0x3c4);
|
|
||||||
crtcval = inb(0x3c5);
|
|
||||||
gdcidx = inb(0x3ce);
|
|
||||||
gdcval = inb(0x3cf);
|
|
||||||
}
|
|
||||||
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
|
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos, VGLDisplay,
|
||||||
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
|
||||||
if (VGLModeInfo.vi_mem_model != V_INFO_MM_DIRECT) {
|
|
||||||
outb(0x3c4, crtcidx);
|
|
||||||
outb(0x3c5, crtcval);
|
|
||||||
outb(0x3ce, gdcidx);
|
|
||||||
outb(0x3cf, gdcval);
|
|
||||||
}
|
|
||||||
INTON();
|
INTON();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user