kdrive/fbdev: revive randr new screen size logic
hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig': hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable] hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
808c87bff7
commit
8928f8fa0b
|
@ -465,15 +465,19 @@ fbdevRandRSetConfig(ScreenPtr pScreen,
|
||||||
int oldheight;
|
int oldheight;
|
||||||
int oldmmwidth;
|
int oldmmwidth;
|
||||||
int oldmmheight;
|
int oldmmheight;
|
||||||
int newwidth, newheight;
|
int newwidth, newheight, newmmwidth, newmmheight;
|
||||||
|
|
||||||
if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) {
|
if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) {
|
||||||
newwidth = pSize->width;
|
newwidth = pSize->width;
|
||||||
newheight = pSize->height;
|
newheight = pSize->height;
|
||||||
|
newmmwidth = pSize->mmWidth;
|
||||||
|
newmmheight = pSize->mmHeight;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newwidth = pSize->height;
|
newwidth = pSize->height;
|
||||||
newheight = pSize->width;
|
newheight = pSize->width;
|
||||||
|
newmmwidth = pSize->mmHeight;
|
||||||
|
newmmheight = pSize->mmWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasEnabled)
|
if (wasEnabled)
|
||||||
|
@ -491,6 +495,10 @@ fbdevRandRSetConfig(ScreenPtr pScreen,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scrpriv->randr = KdAddRotation(screen->randr, randr);
|
scrpriv->randr = KdAddRotation(screen->randr, randr);
|
||||||
|
pScreen->width = newwidth;
|
||||||
|
pScreen->height = newheight;
|
||||||
|
pScreen->mmWidth = newmmwidth;
|
||||||
|
pScreen->mmHeight = newmmheight;
|
||||||
|
|
||||||
fbdevUnmapFramebuffer(screen);
|
fbdevUnmapFramebuffer(screen);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue