Only set screen parameters if resolution has changed from current values.
Patch from scoony@noos.fr.
This commit is contained in:
parent
ba3b6fd23b
commit
0d95bdfbab
|
@ -156,10 +156,13 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
|
||||||
struct fb_var_screeninfo var;
|
struct fb_var_screeninfo var;
|
||||||
const KdMonitorTiming *t;
|
const KdMonitorTiming *t;
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
|
k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
|
||||||
|
|
||||||
if (!screen->width || !screen->height)
|
if (!screen->width || !screen->height)
|
||||||
{
|
{
|
||||||
if (ioctl (priv->fd, FBIOGET_VSCREENINFO, &var) >= 0) {
|
if (k >= 0)
|
||||||
|
{
|
||||||
screen->width = var.xres;
|
screen->width = var.xres;
|
||||||
screen->height = var.yres;
|
screen->height = var.yres;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +182,8 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
|
||||||
screen->height = t->vertical;
|
screen->height = t->vertical;
|
||||||
|
|
||||||
/* Now try setting the mode */
|
/* Now try setting the mode */
|
||||||
fbdevConvertMonitorTiming (t, &var);
|
if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres))
|
||||||
|
fbdevConvertMonitorTiming (t, &var);
|
||||||
|
|
||||||
var.activate = FB_ACTIVATE_NOW;
|
var.activate = FB_ACTIVATE_NOW;
|
||||||
var.bits_per_pixel = screen->fb[0].depth;
|
var.bits_per_pixel = screen->fb[0].depth;
|
||||||
|
|
Loading…
Reference in New Issue