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/keyboard.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/keyboard.c')
-rw-r--r-- | lib/libvgl/keyboard.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libvgl/keyboard.c b/lib/libvgl/keyboard.c index 334d973..bb28164 100644 --- a/lib/libvgl/keyboard.c +++ b/lib/libvgl/keyboard.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$ + * $Id: keyboard.c,v 1.1 1997/10/01 20:53:38 sos Exp $ */ #include <stdio.h> @@ -48,6 +48,7 @@ VGLKeyboardInit(int mode) tcgetattr(0, &VGLKeyboardTty); term = VGLKeyboardTty; + cfmakeraw(&term); term.c_iflag = IGNPAR | IGNBRK; term.c_oflag = 0; term.c_cflag = CREAD | CS8; @@ -75,9 +76,10 @@ VGLKeyboardInit(int mode) void VGLKeyboardEnd() { - if (VGLKeyboardMode != -1) + if (VGLKeyboardMode != -1) { ioctl(0, KDSKBMODE, VGLKeyboardMode); - tcsetattr(0, TCSANOW, &VGLKeyboardTty); + tcsetattr(0, TCSANOW, &VGLKeyboardTty); + } } int |