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.
This commit is contained in:
Bruce Evans 2019-04-26 13:22:54 +00:00
parent 7181920238
commit a73b15498c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346744

View file

@ -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;