summaryrefslogtreecommitdiff
path: root/hw/kdrive/fbdev/fbdev.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2004-05-06 16:19:32 +0000
committerKeith Packard <keithp@keithp.com>2004-05-06 16:19:32 +0000
commit7124cfaa006e840ba48dcc466c0dc8b34503a686 (patch)
treed30a897d8f7031f2219c488b8c5b5d42dfb1d1eb /hw/kdrive/fbdev/fbdev.c
parente4ac2411eddf1f01ef9204f27b6d1ce8f1749439 (diff)
Use current resolution by default, change rate to 75 to match
fbdevModeSupported cut-off (?). Glenn McGrath <glennm@hydrix.com>
Diffstat (limited to 'hw/kdrive/fbdev/fbdev.c')
-rw-r--r--hw/kdrive/fbdev/fbdev.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c
index 6a249f5b7..ea2fb4c1e 100644
--- a/hw/kdrive/fbdev/fbdev.c
+++ b/hw/kdrive/fbdev/fbdev.c
@@ -162,9 +162,16 @@ fbdevScreenInitialize (KdScreenInfo *screen, FbdevScrPriv *scrpriv)
if (!screen->width || !screen->height)
{
- screen->width = 1024;
- screen->height = 768;
- screen->rate = 72;
+ if (ioctl (priv->fd, FBIOGET_VSCREENINFO, &var) >= 0) {
+ screen->width = var.xres;
+ screen->height = var.yres;
+ }
+ else
+ {
+ screen->width = 1024;
+ screen->height = 768;
+ }
+ screen->rate = 75;
}
if (!screen->fb[0].depth)
screen->fb[0].depth = 16;