From df2f2ff5a4ebf6c5289da64bf3f572341a0f7656 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sun, 28 Nov 2004 23:20:17 +0000 Subject: [PATCH] Re-read "fix" structure from kernel after mode selection, in case line pitch has changed. --- hw/kdrive/fbdev/fbdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index bae235bc9..d38701019 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -198,6 +198,11 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv) return FALSE; } + /* Re-get the "fixed" parameters since they might have changed */ + k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix); + if (k < 0) + perror ("FBIOGET_FSCREENINFO"); + /* Now get the new screeninfo */ ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var); depth = priv->var.bits_per_pixel;