diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-11 11:49:13 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-11 11:49:13 +0000 |
commit | 4827e5dee0d2615ed713c17620e24c1b6a572b7a (patch) | |
tree | 171142f7e9c43bf7c9b5c225ce09f8e33a342ad8 /sys/arch/sparc | |
parent | 2a2d8eb6180917cbae57bd3e9bfd652c85e17614 (diff) |
Limit the console size by the frambuffer size. My 4/100 seems
to lie about the console size
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c index 5c7e3c70916..af91565c673 100644 --- a/sys/arch/sparc/dev/fb.c +++ b/sys/arch/sparc/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.10 1997/08/08 08:25:04 downsj Exp $ */ +/* $OpenBSD: fb.c,v 1.11 1997/11/11 11:49:12 niklas Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -405,31 +405,30 @@ fbrcons_init(fb) /* Setup the static font */ rc->rc_font = &console_font; -#if defined(RASTERCONS_FULLSCREEN) || defined(RASTERCONS_SMALLFONT) rc->rc_maxcol = rc->rc_width / rc->rc_font->width; rc->rc_maxrow = rc->rc_height / rc->rc_font->height; -#else +#if !defined(RASTERCONS_FULLSCREEN) && !defined(RASTERCONS_SMALLFONT) #if defined(SUN4) if (CPU_ISSUN4) { struct eeprom *eep = (struct eeprom *)eeprom_va; if (eep == NULL) { - rc->rc_maxcol = 80; - rc->rc_maxrow = 34; + rc->rc_maxcol = max(rc->rc_maxcol, 80); + rc->rc_maxrow = max(rc->rc_maxrow, 34); } else { - rc->rc_maxcol = eep->eeTtyCols; - rc->rc_maxrow = eep->eeTtyRows; + rc->rc_maxcol = max(rc->rc_maxcol, eep->eeTtyCols); + rc->rc_maxrow = max(rc->rc_maxrow, eep->eeTtyRows); } } #endif /* SUN4 */ if (!CPU_ISSUN4) { - rc->rc_maxcol = - a2int(getpropstring(optionsnode, "screen-#columns"), 80); - rc->rc_maxrow = - a2int(getpropstring(optionsnode, "screen-#rows"), 34); + rc->rc_maxcol = max(rc->rc_maxcol, + a2int(getpropstring(optionsnode, "screen-#columns"), 80)); + rc->rc_maxrow = max(rc->rc_maxrow, + a2int(getpropstring(optionsnode, "screen-#rows"), 34)); } -#endif /* RASTERCONS_FULLSCREEN || RASTERCONS_SMALLFONT */ +#endif /* !RASTERCONS_FULLSCREEN && !RASTERCONS_SMALLFONT */ #if !(defined(RASTERCONS_FULLSCREEN) || defined(RASTERCONS_SMALLFONT)) /* Determine addresses of prom emulator row and column */ |