Set default x and y resolution to current resolution
Glenn McGrath
glennm at hydrix.com
Wed May 5 23:31:56 PDT 2004
Currently Xfbdev uses a default of 1024x768 unless -screen values were
specified.
This patch sets the default X and Y to the current resultion, it bumps
up the resultion from 72 to 75, which matches the cuttof value in
fbdevModeSupported(), i dont know where 75 comes from, not sure why that
funtion if even necessary.
Glenn
-------------- next part --------------
Index: hw/kdrive/fbdev/fbdev.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/fbdev/fbdev.c,v
retrieving revision 1.43
diff -u -r1.43 fbdev.c
--- hw/kdrive/fbdev/fbdev.c 1 Dec 2003 22:11:12 -0000 1.43
+++ hw/kdrive/fbdev/fbdev.c 6 May 2004 06:25:21 -0000
@@ -162,9 +162,13 @@
if (!screen->width || !screen->height)
{
- screen->width = 1024;
- screen->height = 768;
- screen->rate = 72;
+ if (ioctl (priv->fd, FBIOGET_VSCREENINFO, &var) < 0) {
+ fprintf (stderr, "error: %s\n", strerror (errno));
+ return FALSE;
+ }
+ screen->width = var.xres;
+ screen->height = var.yres;
+ screen->rate = 75;
}
if (!screen->fb[0].depth)
screen->fb[0].depth = 16;
More information about the xserver
mailing list