X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Ffluidballs.c;h=0ce65db3f590bdfd0d44adebed3614ef435e6792;hp=3413a945d510145763c9bbe59f1f15f51bbcf8b8;hb=96a411663168b0ba5432b407a83be55f3df0c802;hpb=bbd0773f2adde4927a6196361d4061e70bf48cd9 diff --git a/hacks/fluidballs.c b/hacks/fluidballs.c index 3413a945..0ce65db3 100644 --- a/hacks/fluidballs.c +++ b/hacks/fluidballs.c @@ -370,6 +370,9 @@ init_balls (Display *dpy, Window window) state->m[i] = pow(state->r[i],3) * M_PI * 1.3333; } + memcpy (state->opx, state->px, sizeof (*state->opx) * (state->count + 1)); + memcpy (state->opy, state->py, sizeof (*state->opx) * (state->count + 1)); + return state; } @@ -423,7 +426,7 @@ check_wall_clock (b_state *state, float max_d) if (tick++ > 20) /* don't call gettimeofday() too often -- it's slow. */ { struct timeval now; - static struct timeval last = {0, }; + static struct timeval last = { 0, 0 }; # ifdef GETTIMEOFDAY_TWO_ARGS struct timezone tzp; gettimeofday(&now, &tzp); @@ -483,9 +486,9 @@ repaint_balls (b_state *state) x2b = (state->px[a] + state->r[a] - state->xmin); y2b = (state->py[a] + state->r[a] - state->ymin); - if (!state->dbeclear_p || + if (!state->dbeclear_p #ifdef HAVE_DOUBLE_BUFFER_EXTENSION - !state->backb + || !state->backb #endif /* HAVE_DOUBLE_BUFFER_EXTENSION */ ) {