Set default x and y resolution to current resolution
Glenn McGrath <[email protected]> Thu, 6 May 2004 16:31:56 +1000
| Newsgroups | gmane.comp.freedesktop.xserver |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ xserver mailing list [email protected] http://freedesktop.org/mailman/listinfo/xserver
xserver_default_current_xyres.patch
(text/plain, 763 B)
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;