From http://www.jwz.org/xscreensaver/xscreensaver-5.38.tar.gz
[xscreensaver] / hacks / metaballs.c
index 0e46de67203f65a2bbbf827ab0be849d683b4c04..3a2ae73ede3b31d37739c6f318d247226ca50072 100644 (file)
@@ -62,7 +62,7 @@ static void init_blob(struct state *st, BLOB *blob)
 
 static void Execute( struct state *st )
 {
-       unsigned int i, j, k;
+       int i, j, k;
 
        /* clear st->blub array */
        for (i = 0; i < st->iWinHeight; ++i)
@@ -254,6 +254,10 @@ static void Initialize( struct state *st )
         if (st->radius >= 128) /* should use UCHAR_MAX? */
           st->radius = 127; /* st->dradius should fit in u_char */
 
+        if (st->iWinWidth < 100 || st->iWinHeight < 100) /* tiny window */
+          if (st->radius < 20)
+            st->radius = 20;
+
        st->dradius = st->radius * 2;
        st->sradius = st->radius * st->radius;
 
@@ -408,6 +412,9 @@ static const char *metaballs_defaults [] = {
   "*delay:    10000",
   "*radius:   100",
   "*delta:   3",
+#ifdef HAVE_MOBILE
+  "*ignoreRotation: True",
+#endif
   0
 };