mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 10:40:29 +01:00
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
1 changed files with 6 additions and 2 deletions
|
|
@ -156,10 +156,13 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
|
|||
struct fb_var_screeninfo var;
|
||||
const KdMonitorTiming *t;
|
||||
int k;
|
||||
|
||||
k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
|
||||
|
||||
if (!screen->width || !screen->height)
|
||||
{
|
||||
if (ioctl (priv->fd, FBIOGET_VSCREENINFO, &var) >= 0) {
|
||||
if (k >= 0)
|
||||
{
|
||||
screen->width = var.xres;
|
||||
screen->height = var.yres;
|
||||
}
|
||||
|
|
@ -179,7 +182,8 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
|
|||
screen->height = t->vertical;
|
||||
|
||||
/* 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.bits_per_pixel = screen->fb[0].depth;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue