Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 2019 13:22:55 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346744 - head/lib/libvgl
Message-ID:  <201904261322.x3QDMtOM086010@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904261322.x3QDMtOM086010>