aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--display.c17
-rw-r--r--lcd4linux.c25
-rw-r--r--lcd4linux.kdelnk2
-rw-r--r--lcd4linux.xpm19
4 files changed, 45 insertions, 18 deletions
diff --git a/display.c b/display.c
index 92636b8..04c8f40 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $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
*
@@ -20,6 +20,11 @@
*
*
* $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
@@ -166,11 +171,11 @@ int lcd_query (int *rows, int *cols, int *xres, int *yres, int *bars)
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;
}
diff --git a/lcd4linux.c b/lcd4linux.c
index bd0fc7f..974f8eb 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -1,4 +1,4 @@
-/* $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
*
@@ -20,6 +20,11 @@
*
*
* $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
@@ -119,8 +124,8 @@ int main (int argc, char *argv[])
{
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':
@@ -175,14 +180,16 @@ int main (int argc, char *argv[])
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) {
diff --git a/lcd4linux.kdelnk b/lcd4linux.kdelnk
index 5ccfd04..357cd38 100644
--- a/lcd4linux.kdelnk
+++ b/lcd4linux.kdelnk
@@ -1,8 +1,8 @@
# 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
diff --git a/lcd4linux.xpm b/lcd4linux.xpm
index f319ae7..acfa772 100644
--- a/lcd4linux.xpm
+++ b/lcd4linux.xpm
@@ -1,9 +1,16 @@
/* XPM */
static char *lcd4linux[] = {
-"38 18 2 1",
+"38 32 3 1",
+" c None",
"# c #102000",
". c #a0d000",
-"......................................",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
"......................................",
"..##............######....######......",
"..##............######....######......",
@@ -21,4 +28,12 @@ static char *lcd4linux[] = {
"..##########....######....######......",
"......................................",
"......................................",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
};