summaryrefslogtreecommitdiff
path: root/lib/libvgl
diff options
context:
space:
mode:
authorKazutaka YOKOTA <yokota@FreeBSD.org>1999-08-28 02:39:10 +0000
committerKazutaka YOKOTA <yokota@FreeBSD.org>1999-08-28 02:39:10 +0000
commitfbe39a1af1112ca8e2643913eeb805561eb84b41 (patch)
tree98b742780d499273c20b035a0c4bcc22627c6215 /lib/libvgl
parent2185977908490cf0c35c4d2e0da2b9f0f03fad49 (diff)
Notes
Diffstat (limited to 'lib/libvgl')
-rw-r--r--lib/libvgl/main.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c
index 3e0a51202ab4..fc13f46b0c43 100644
--- a/lib/libvgl/main.c
+++ b/lib/libvgl/main.c
@@ -54,13 +54,11 @@ struct vt_mode smode;
if (!VGLInitDone)
return;
-/*
- while (!VGLOnDisplay) pause();
- VGLCheckSwitch();;
-*/
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x0f);
- bzero(VGLMem, 64*1024);
+ if (VGLOnDisplay && !VGLSwitchPending) {
+ outb(0x3c4, 0x02);
+ outb(0x3c5, 0x0f);
+ bzero(VGLMem, 64*1024);
+ }
if (VGLOldMode >= M_VESA_BASE) {
/* ugly, but necessary */
ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0);
@@ -110,6 +108,7 @@ VGLInit(int mode)
signal(SIGUSR1, VGLSwitch);
signal(SIGINT, VGLAbort);
+ signal(SIGTERM, VGLAbort);
signal(SIGSEGV, VGLAbort);
signal(SIGBUS, VGLAbort);
@@ -192,7 +191,7 @@ VGLInit(int mode)
void
VGLCheckSwitch()
{
- if (VGLSwitchPending) {
+ while (VGLSwitchPending) {
int i;
VGLSwitchPending = 0;
@@ -236,8 +235,8 @@ VGLCheckSwitch()
ioctl(0, VT_RELDISP, VT_TRUE);
VGLDisplay->Bitmap = VGLBuf;
VGLDisplay->Type = MEMBUF;
+ while (!VGLOnDisplay) pause();
}
}
- while (!VGLOnDisplay) pause();
}