diff options
author | yokota <yokota@FreeBSD.org> | 1999-08-22 03:31:13 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-08-22 03:31:13 +0000 |
commit | c8009b220af073b794203725b85b11aa0443d8e8 (patch) | |
tree | f6b8b068a9da5917506b6d43dd5669f28d8ddadd /lib/libvgl/main.c | |
parent | 36ba7111cd3c5db33f5ff2f2f35460d42a9d0f89 (diff) | |
download | FreeBSD-src-c8009b220af073b794203725b85b11aa0443d8e8.zip FreeBSD-src-c8009b220af073b794203725b85b11aa0443d8e8.tar.gz |
Assorted bug fixes.
keyboard.c
- Call tcsetattr() in VGLKeyboardEnd() to restore tty, only when
tty attributes have been previously saved.
PR: misc/9524
Submitted by: Katusyuki 'kei' Maeda (kei@nanet.co.jp)
- Set up the tty raw mode correctly.
main.c
- Restore VESA_800x600 raster text mode correctly in VGLEnd().
Submitted by: des
text.c
- Allocate the correct size of a font buffer in VGLSetFontFile().
I forgot the submitter ;-(
simple.c, bitmap.c
- Fix address calculation for the VGA mode X in VGLGetXY() and
VGLBitmapCopy().
- Fix typo (dsty -> dstx) in __VGLBitmapCopy().
Reviewed by: sos
Diffstat (limited to 'lib/libvgl/main.c')
-rw-r--r-- | lib/libvgl/main.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c index a7af6e9..ade2442 100644 --- a/lib/libvgl/main.c +++ b/lib/libvgl/main.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: main.c,v 1.1 1997/08/17 21:09:34 sos Exp $ + * $Id: main.c,v 1.2 1997/10/01 20:53:39 sos Exp $ */ #include <stdio.h> @@ -61,7 +61,19 @@ struct vt_mode smode; outb(0x3c4, 0x02); outb(0x3c5, 0x0f); bzero(VGLMem, 64*1024); - ioctl(0, _IO('S', VGLOldMode), 0); + if (VGLOldMode >= M_VESA_BASE) { + /* ugly, but necessary */ + ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0); + if (VGLOldMode == M_VESA_800x600) { + int size[3]; + size[0] = 80; + size[1] = 25; + size[2] = 16; + ioctl(0, KDRASTER, size); + } + } else { + ioctl(0, _IO('S', VGLOldMode), 0); + } ioctl(0, KDDISABIO, 0); ioctl(0, KDSETMODE, KD_TEXT); smode.mode = VT_AUTO; |