From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / epicycle.c
index 004c0ea56a1a9d123efc4a1ebc0b7dc52e81230e..288999fa95bbf7220b50769c69d3d950a3600db3 100644 (file)
@@ -65,6 +65,9 @@ static const char *epicycle_defaults [] = {
   "*divisorPoisson: 0.4",
   "*sizeFactorMin: 1.05",
   "*sizeFactorMax: 2.05",
+#ifdef USE_IPHONE
+  "*ignoreRotation: True",
+#endif
   0
 };
 
@@ -401,7 +404,7 @@ colour_init(struct state *st, XWindowAttributes *pxgwa)
    */
   if (st->colors)
     {
-      free_colors(st->dpy, st->cmap, st->colors, st->ncolors);
+      free_colors(pxgwa->screen, st->cmap, st->colors, st->ncolors);
       st->colors = 0;
       st->ncolors = 0;
     }
@@ -421,7 +424,8 @@ colour_init(struct state *st, XWindowAttributes *pxgwa)
       st->colors = (XColor *) malloc(sizeof(*st->colors) * (st->ncolors+1));
       if (!st->colors) abort();
          
-      make_smooth_colormap (st->dpy, pxgwa->visual, st->cmap, st->colors, &st->ncolors,
+      make_smooth_colormap (pxgwa->screen, pxgwa->visual, st->cmap,
+                            st->colors, &st->ncolors,
                            True, /* allocate */
                            False, /* not writable */
                            True); /* verbose (complain about failure) */