svn commit: r346744 - head/lib/libvgl

Bruce Evans bde at FreeBSD.org
Fri Apr 26 13:22:56 UTC 2019


Author: bde
Date: Fri Apr 26 13:22:54 2019
New Revision: 346744
URL: https://svnweb.freebsd.org/changeset/base/346744

Log:
  Restore the line width in VGLEnd().  The line width may be changed by
  VGLSetVScreenSize(), but is not restored by mode switches to at least
  standard text mode, so must be restored explicitly.  Standard text mode
  displayed blanks when the line width was doubled.

Modified:
  head/lib/libvgl/main.c

Modified: head/lib/libvgl/main.c
==============================================================================
--- head/lib/libvgl/main.c	Fri Apr 26 13:04:10 2019	(r346743)
+++ head/lib/libvgl/main.c	Fri Apr 26 13:22:54 2019	(r346744)
@@ -64,6 +64,7 @@ static unsigned int VGLCurWindow;
 static int VGLInitDone = 0;
 static video_info_t VGLOldModeInfo;
 static vid_info_t VGLOldVInfo;
+static int VGLOldVXsize;
 
 void
 VGLEnd()
@@ -85,6 +86,8 @@ struct vt_mode smode;
     munmap(VGLMem, VGLAdpInfo.va_window_size);
   }
 
+  ioctl(0, FBIO_SETLINEWIDTH, &VGLOldVXsize);
+
   if (VGLOldMode >= M_VESA_BASE)
     ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0);
   else
@@ -322,6 +325,7 @@ VGLInit(int mode)
   depth = VGLModeInfo.vi_depth;
   if (depth == 15)
     depth = 16;
+  VGLOldVXsize =
   VGLDisplay->VXsize = VGLAdpInfo.va_line_width
 			   *8/(depth/VGLModeInfo.vi_planes);
   VGLDisplay->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width;


More information about the svn-src-head mailing list