Skip to content

Commit

Permalink
fbdevhw: Use displayWidth for fbdev virtual width when appropriate.
Browse files Browse the repository at this point in the history
The fbdev API doesn't allow setting the pitch explicitly, so we have to set
the virtual width to the pitch we're using for drawing. This fixes corruption
after changing the virtual width with RandR.
(cherry picked from commit d077c0d)
  • Loading branch information
Michel Dänzer authored and Keith Packard committed Mar 27, 2007
1 parent 28af734 commit d7bcad9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/xfree86/fbdevhw/fbdevhw.c
Expand Up @@ -183,7 +183,8 @@ print_xfree_mode(char *txt, DisplayModePtr mode)
static void
xfree2fbdev_fblayout(ScrnInfoPtr pScrn, struct fb_var_screeninfo *var)
{
var->xres_virtual = pScrn->virtualX;
var->xres_virtual = pScrn->displayWidth ? pScrn->displayWidth :
pScrn->virtualX;
var->yres_virtual = pScrn->virtualY;
var->bits_per_pixel = pScrn->bitsPerPixel;
var->red.length = pScrn->weight.red;
Expand Down

0 comments on commit d7bcad9

Please sign in to comment.