X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=hacks%2Fzoom.c;h=8f7364d369279de0556c17b55cd8f32effbf0811;hb=3f438031d610c7e15fd33876a879b97e290e05fb;hp=8911c7ba4cb39c1f1911d6c1b2aa991efd9442fb;hpb=40eacb5812ef7c0e3374fb139afbb4f5bc8bbfb5;p=xscreensaver diff --git a/hacks/zoom.c b/hacks/zoom.c index 8911c7ba..8f7364d3 100644 --- a/hacks/zoom.c +++ b/hacks/zoom.c @@ -102,7 +102,7 @@ static void init_hack(Display *dpy, Window window) orig_map = NULL; pm = XCreatePixmap(dpy, window, sizex, sizey, xgwa.depth); - load_random_image (xgwa.screen, window, pm); + load_random_image (xgwa.screen, window, pm, NULL, NULL); if (!lenses) { orig_map = XGetImage(dpy, pm, 0, 0, sizex, sizey, ~0L, ZPixmap); @@ -138,9 +138,9 @@ static void onestep(Display *dpy, Window window) now = currentTimeInMs(); /* find new x,y */ - tlx = ((1. + sin(((float)now) / X_PERIOD * 2. * M_PI))/2.0) + tlx = ((1. + sin(((double)now) / X_PERIOD * 2. * M_PI))/2.0) * (sizex - s/2) /* -s/4 */ + MINX; - tly = ((1. + sin(((float)now) / Y_PERIOD * 2. * M_PI))/2.0) + tly = ((1. + sin(((double)now) / Y_PERIOD * 2. * M_PI))/2.0) * (sizey - s/2) /* -s/4 */ + MINY; if (lenses) {