X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fmetaballs.c;h=3a2ae73ede3b31d37739c6f318d247226ca50072;hb=39809ded547bdbb08207d3e514950425215b4410;hp=2eb5ed4ad27d2660a38259d3a1d0c326aa227224;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/metaballs.c b/hacks/metaballs.c index 2eb5ed4a..3a2ae73e 100644 --- a/hacks/metaballs.c +++ b/hacks/metaballs.c @@ -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) @@ -200,7 +200,7 @@ static void Initialize( struct state *st ) { XGCValues gcValues; XWindowAttributes XWinAttribs; - int iBitsPerPixel, i, j; + int /*iBitsPerPixel,*/ i, j; unsigned int distance_squared; float fraction; @@ -208,6 +208,7 @@ static void Initialize( struct state *st ) XGetWindowAttributes( st->dpy, st->window, &XWinAttribs ); /* Find the preferred bits-per-pixel. (jwz) */ +#if 0 { int pfvc = 0; XPixmapFormatValues *pfv = XListPixmapFormats( st->dpy, &pfvc ); @@ -220,6 +221,7 @@ static void Initialize( struct state *st ) if( pfv ) XFree (pfv); } +#endif /* Create the GC. */ st->gc = XCreateGC( st->dpy, st->window, 0, &gcValues ); @@ -252,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; @@ -403,9 +409,12 @@ static const char *metaballs_defaults [] = { "*count: 10", "*cycles: 1000", "*ncolors: 256", - "*delay: 5000", + "*delay: 10000", "*radius: 100", "*delta: 3", +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 }; @@ -421,7 +430,7 @@ static XrmOptionDescRec metaballs_options [] = { }; -XSCREENSAVER_MODULE ("Metaballs", metaballs) +XSCREENSAVER_MODULE ("MetaBalls", metaballs) /* End of Module - "metaballs.c" */