X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fpopsquares.c;h=065ad06d4e9189642e06dffb75826d20a57ccf1b;hp=55d3db175e808e3e44577ccd90a123f006159770;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hpb=88cfe534a698a0562e81345957a50714af1453bc diff --git a/hacks/popsquares.c b/hacks/popsquares.c index 55d3db17..065ad06d 100644 --- a/hacks/popsquares.c +++ b/hacks/popsquares.c @@ -69,7 +69,7 @@ popsquares_init (Display *dpy, Window window) st->twitch = get_boolean_resource(st->dpy, "twitch", "Boolean"); st->dbuf = get_boolean_resource(st->dpy, "doubleBuffer", "Boolean"); -# ifdef HAVE_COCOA /* Don't second-guess Quartz's double-buffering */ +# ifdef HAVE_JWXYZ /* Don't second-guess Quartz's double-buffering */ st->dbuf = False; # endif @@ -86,6 +86,8 @@ popsquares_init (Display *dpy, Window window) st->gw = st->sw ? st->xgwa.width / st->sw : 0; st->gh = st->sh ? st->xgwa.height / st->sh : 0; st->nsquares = st->gw * st->gh; + if (st->nsquares < 1) st->nsquares = 1; + if (st->ncolors < 1) st->ncolors = 1; gcv.foreground = fg.pixel; gcv.background = bg.pixel; @@ -196,6 +198,7 @@ popsquares_reshape (Display *dpy, Window window, void *closure, st->gh = st->sh ? st->xgwa.height / st->sh : 0; st->nsquares = st->gw * st->gh; free (st->squares); + if (st->nsquares < 1) st->nsquares = 1; st->squares = (square *) calloc (st->nsquares, sizeof(square)); for (y = 0; y < st->gh; y++) @@ -246,7 +249,7 @@ static const char *popsquares_defaults [] = { "*useDBE: True", "*useDBEClear: True", #endif /* HAVE_DOUBLE_BUFFER_EXTENSION */ -#ifdef USE_IPHONE +#ifdef HAVE_MOBILE "*ignoreRotation: True", #endif 0