X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fpyro.c;h=c2297636dda26fabfc2fc96600013178a340a41d;hp=e46e93fa97be4cb7247726d7eaafcc07c1c0b09c;hb=8eb2873d7054e705c4e83f22d18c40946a9e2529;hpb=a1d41b2aa6e18bf9a49b914a99dda8232c5d7762 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,