projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.00.tar.gz
[xscreensaver]
/
hacks
/
pyro.c
diff --git
a/hacks/pyro.c
b/hacks/pyro.c
index e46e93fa97be4cb7247726d7eaafcc07c1c0b09c..c2297636dda26fabfc2fc96600013178a340a41d 100644
(file)
--- 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;
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,
if (! mono_p)
{
hsv_to_rgb (random () % 360, 1.0, 1.0,