fbdevhw: Use displayWidth for fbdev virtual width when appropriate.
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.
This commit is contained in:
parent
c385bcf0bd
commit
d077c0da47
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user