Re-read "fix" structure from kernel after mode selection, in case line

pitch has changed.
This commit is contained in:
Phil Blundell 2004-11-28 23:20:17 +00:00
parent 6062f6a6e7
commit df2f2ff5a4

View File

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