aboutsummaryrefslogtreecommitdiff
path: root/lib/libvgl
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2019-04-26 14:44:20 +0000
committerBruce Evans <bde@FreeBSD.org>2019-04-26 14:44:20 +0000
commitd05368940d86d3505b71a2a6689fc9cfeb95b617 (patch)
tree22710671054b3f76aab431feac7b46b96f36e1c2 /lib/libvgl
parentea0a99050980bc03a41f85ba86712a773f9989c8 (diff)
downloadsrc-d05368940d86d3505b71a2a6689fc9cfeb95b617.tar.gz
src-d05368940d86d3505b71a2a6689fc9cfeb95b617.zip
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.
Notes
Notes: svn path=/head/; revision=346747
Diffstat (limited to 'lib/libvgl')
-rw-r--r--lib/libvgl/mouse.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/libvgl/mouse.c b/lib/libvgl/mouse.c
index 453e1233c1e6..e479cb68b83f 100644
--- a/lib/libvgl/mouse.c
+++ b/lib/libvgl/mouse.c
@@ -108,18 +108,11 @@ VGLMousePointerShow()
byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4];
VGLBitmap buffer =
VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf);
- byte crtcidx, crtcval, gdcidx, gdcval;
int pos;
if (!VGLMouseVisible) {
INTOFF();
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;
__VGLBitmapCopy(&VGLVDisplay, VGLMouseXpos, VGLMouseYpos,
&buffer, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
@@ -130,12 +123,6 @@ VGLMousePointerShow()
VGLDisplay->PixelBytes);
__VGLBitmapCopy(&buffer, 0, 0, VGLDisplay,
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();
}
}
@@ -143,25 +130,11 @@ VGLMousePointerShow()
void
VGLMousePointerHide()
{
- byte crtcidx, crtcval, gdcidx, gdcval;
-
if (VGLMouseVisible) {
INTOFF();
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,
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();
}
}