X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxrayswarm.c;h=678c7b042eea9fd82175e3c286f85f377f3c206b;hb=39809ded547bdbb08207d3e514950425215b4410;hp=f6f5a6e98e8a458646053013d4d8e4327c01069e;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/xrayswarm.c b/hacks/xrayswarm.c index f6f5a6e9..678c7b04 100644 --- a/hacks/xrayswarm.c +++ b/hacks/xrayswarm.c @@ -49,7 +49,7 @@ from the X Consortium. #include #include "screenhack.h" -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ # define HAVE_GETTIMEOFDAY 1 #endif @@ -60,8 +60,13 @@ from the X Consortium. **********************************************************************/ static const char *xrayswarm_defaults [] ={ + ".lowrez: true", ".background: black", - "*delay: 0", + "*delay: 20000", + "*fpsSolid: true", +#ifdef HAVE_MOBILE + "*ignoreRotation: True", +#endif 0 }; @@ -298,7 +303,7 @@ static int initGraphics(struct state *st) xgcv.foreground=get_pixel_resource (st->dpy, cmap, "background", "Background"); st->fgc[0]=XCreateGC(st->dpy, st->win, GCForeground|GCFunction,&xgcv); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[0], False); #endif @@ -306,7 +311,7 @@ static int initGraphics(struct state *st) if (mono_p) { xgcv.foreground=get_pixel_resource (st->dpy, cmap, "foreground", "Foreground"); st->fgc[1]=XCreateGC(st->dpy,st->win,GCForeground|GCFunction,&xgcv); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[1], False); #endif for (i=0;inumColors;i+=2) st->fgc[i]=st->fgc[0]; @@ -320,14 +325,14 @@ static int initGraphics(struct state *st) XAllocColor(st->dpy,cmap,&color); xgcv.foreground=color.pixel; st->fgc[i] = XCreateGC(st->dpy, st->win, GCForeground | GCFunction,&xgcv); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->fgc[i], False); #endif } } st->cgc = XCreateGC(st->dpy,st->win,GCForeground|GCFunction,&xgcv); XSetGraphicsExposures(st->dpy,st->cgc,False); -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ jwxyz_XSetAntiAliasing (st->dpy, st->cgc, False); #endif @@ -481,8 +486,8 @@ static void computeColorIndices(struct state *st) if (st->graySIndex[st->trailLen-1-i] > 19) st->graySIndex[st->trailLen-1-i] = 19; } - schizoLength = st->trailLen/4; - if (schizoLength < 3) schizoLength = 3; + /*schizoLength = st->trailLen/4; + if (schizoLength < 3) schizoLength = 3;*/ /* red schizo */ for (i = 0; i < st->trailLen; i++) { /* redSIndex[trailLen-1-i] = @@ -1195,6 +1200,12 @@ static void xrayswarm_reshape (Display *dpy, Window window, void *closure, unsigned int w, unsigned int h) { + struct state *st = (struct state *) closure; + st->xsize = w; + st->ysize = h; + st->xc = st->xsize >> 1; + st->yc = st->ysize >> 1; + st->maxy = st->ysize/(float)st->xsize; } static Bool