From 8140e7ccd2acf36e1781a727de589743d094373a Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 13 Sep 2008 23:46:36 +0000 Subject: [PATCH] MFC r1.28: Add line width calculations for 15/16 and 24/32 bit modes in case the "Get Scan Line Length" function fails, as it does in Parallels (in Version 2.2, Build 2112 at least). --- sys/dev/video/i386/vesa/vesa.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/video/i386/vesa/vesa.c b/sys/dev/video/i386/vesa/vesa.c index d6d6f4ab9e..456819504d 100644 --- a/sys/dev/video/i386/vesa/vesa.c +++ b/sys/dev/video/i386/vesa/vesa.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/vesa.c,v 1.32.2.1 2002/08/13 02:42:33 rwatson Exp $ - * $DragonFly: src/sys/dev/video/i386/vesa/vesa.c,v 1.25 2008/04/30 04:05:21 dillon Exp $ + * $DragonFly: src/sys/dev/video/i386/vesa/vesa.c,v 1.25.2.1 2008/09/13 23:46:36 swildner Exp $ */ #include "opt_vga.h" @@ -1072,6 +1072,14 @@ vesa_set_mode(video_adapter_t *adp, int mode) default: /* shouldn't happen */ vesa_adp->va_line_width = info.vi_width; break; + case 15: + case 16: + vesa_adp->va_line_width = info.vi_width*2; + break; + case 24: + case 32: + vesa_adp->va_line_width = info.vi_width*4; + break; } } else { vesa_adp->va_line_width = info.vi_width; -- 2.11.4.GIT