-/* $Id: display.c,v 1.13 2000/03/30 16:46:57 reinelt Exp $
+/* $Id: display.c,v 1.14 2000/04/03 17:31:52 reinelt Exp $
*
* framework for device drivers
*
*
*
* $Log: display.c,v $
+ * Revision 1.14 2000/04/03 17:31:52 reinelt
+ *
+ * suppress welcome message if display is smaller than 20x2
+ * change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon
+ *
* Revision 1.13 2000/03/30 16:46:57 reinelt
*
* configure now handles '--with-x' and '--without-x' correct
if (Lcd==NULL)
return -1;
- *rows=Lcd->rows;
- *cols=Lcd->cols;
- *xres=Lcd->xres;
- *yres=Lcd->yres;
- *bars=Lcd->bars;
+ if (rows) *rows=Lcd->rows;
+ if(cols) *cols=Lcd->cols;
+ if (xres) *xres=Lcd->xres;
+ if (yres) *yres=Lcd->yres;
+ if (bars) *bars=Lcd->bars;
return 0;
}
-/* $Id: lcd4linux.c,v 1.16 2000/04/03 04:46:38 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.17 2000/04/03 17:31:52 reinelt Exp $
*
* LCD4Linux
*
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.17 2000/04/03 17:31:52 reinelt
+ *
+ * suppress welcome message if display is smaller than 20x2
+ * change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon
+ *
* Revision 1.16 2000/04/03 04:46:38 reinelt
*
* added '-c key=val' option
{
char *cfg="/etc/lcd4linux.conf";
char *driver;
- int c, smooth;
-
+ int c, x, y, smooth;
+
while ((c=getopt (argc, argv, "c:f:hlo:"))!=EOF) {
switch (c) {
case 'c':
tack=atoi(cfg_get("tack")?:"500");
process_init();
-
lcd_clear();
- lcd_put (1, 1, "* LCD4Linux V" VERSION " *");
- lcd_put (2, 1, " (c) 2000 M.Reinelt");
- lcd_flush();
- sleep (3);
- lcd_clear();
+ lcd_query (&y, &x, NULL, NULL, NULL);
+ if (x>=20 && y>=2) {
+ lcd_put (1, 1, "* LCD4Linux V" VERSION " *");
+ lcd_put (2, 1, " (c) 2000 M.Reinelt");
+ lcd_flush();
+ sleep (3);
+ lcd_clear();
+ }
smooth=0;
while (1) {
# KDE Config File
[KDE Desktop Entry]
Comment[C]=LCD4Linux
-SwallowTitle=XLCD4Linux
SwallowExec=lcd4linux -f /etc/lcd4kde.conf
+SwallowTitle=XLCD4Linux
BinaryPattern=
Name=LCD4Linux
Name[C]=LCD4Linux
/* XPM */
static char *lcd4linux[] = {
-"38 18 2 1",
+"38 32 3 1",
+" c None",
"# c #102000",
". c #a0d000",
-"......................................",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
"......................................",
"..##............######....######......",
"..##............######....######......",
"..##########....######....######......",
"......................................",
"......................................",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
};