diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2000-04-03 17:31:52 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2000-04-03 17:31:52 +0000 |
commit | 7d7789328fabe72374bf90bf65856bbc9e4f540b (patch) | |
tree | d88e02909a0588de1ad6bf5d9371781c2b07e2a4 /lcd4linux.c | |
parent | 8351360331d87e43bae365d948f3b5329b2430e2 (diff) | |
download | lcd4linux-7d7789328fabe72374bf90bf65856bbc9e4f540b.tar.gz |
[lcd4linux @ 2000-04-03 17:31:52 by reinelt]
suppress welcome message if display is smaller than 20x2
change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@37 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'lcd4linux.c')
-rw-r--r-- | lcd4linux.c | 25 |
1 files changed, 16 insertions, 9 deletions
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) { |