X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fpyro.c;h=c2297636dda26fabfc2fc96600013178a340a41d;hb=13dbc569cdc6e29019722c0ef9b932a925efbcad;hp=e46e93fa97be4cb7247726d7eaafcc07c1c0b09c;hpb=3c58fb6311db49c46f1670922933b27c6ea0c065;p=xscreensaver diff --git a/hacks/pyro.c b/hacks/pyro.c index e46e93fa..c2297636 100644 --- a/hacks/pyro.c +++ b/hacks/pyro.c @@ -105,6 +105,13 @@ launch (int xlim, int ylim, int g, p->fuse = ((((random () % 500) + 500) * abs (p->dy / g)) / 1000); p->primary = True; + /* cope with small windows -- those constants assume big windows. */ + { + int div = 1000000 / ylim; + if (div > 1) + p->fuse /= div; + } + if (! mono_p) { hsv_to_rgb (random () % 360, 1.0, 1.0,