diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-17 14:06:03 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-17 14:06:03 +0000 |
commit | f852a91999bc62cfabcb29de323edeff46d2fb9e (patch) | |
tree | ebc6d1df8b52f9bb8c378436884b2397ff9c6a7e | |
parent | 70903543a5ed1773336c448558289d7fde9f2e04 (diff) |
restore VGA fonts on VT switch
Avoids an unusable screen when switching to a VT with a custom VGA font
from X. While it is possible to modify the xserver to invoke an ioctl
for this kettenis@ points out the xserver may have crashed so doing it
in the kernel is preferred.
Problem reported by and patch from John Carmack. Changed slightly to
do the vga_restore_fonts() (write to video memory) call before
vga_setfont() (pointing the character generator at it) at the suggestion
of kettenis@.
ok kettenis@
-rw-r--r-- | sys/dev/ic/vga.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index b6bc080fdfb..cf8bfbab7a8 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga.c,v 1.70 2020/05/16 11:07:54 jsg Exp $ */ +/* $OpenBSD: vga.c,v 1.71 2020/05/17 14:06:02 jsg Exp $ */ /* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */ /*- @@ -820,6 +820,7 @@ vga_doswitch(struct vga_config *vc) vc->currenttype = type; } + vga_restore_fonts(vc); vga_setfont(vc, scr); vga_restore_palette(vc); |