From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / shadebobs.c
index 5b26950a42003ec13f5942520c34e25fab7fae5f..64fa82c9772d7e28b3ba7a87d3f74e4fd00fd6e1 100644 (file)
@@ -52,6 +52,9 @@ static const char *shadebobs_defaults [] = {
   "*cycles:   10",
   "*ncolors:  64",    /* changing this doesn't work particularly well */
   "*delay:    10000",
+#ifdef USE_IPHONE
+  "*ignoreRotation: True",
+#endif
   0
 };
 
@@ -296,12 +299,13 @@ static void Initialize( struct state *st )
 {
        XGCValues gcValues;
        XWindowAttributes XWinAttribs;
-       int iBitsPerPixel;
+       /*int iBitsPerPixel;*/
 
        /* Create the Image for drawing */
        XGetWindowAttributes( st->dpy, st->window, &XWinAttribs );
 
-       /* Find the preferred bits-per-pixel. (jwz) */
+#if 0
+  /* Find the preferred bits-per-pixel. (jwz) */
        {
                int i, pfvc = 0;
                XPixmapFormatValues *pfv = XListPixmapFormats( st->dpy, &pfvc );
@@ -314,6 +318,7 @@ static void Initialize( struct state *st )
                if( pfv )
                        XFree (pfv);
        }
+#endif
 
        /*  Create the GC. */
        st->gc = XCreateGC( st->dpy, st->window, 0, &gcValues );
@@ -344,7 +349,7 @@ static void Initialize( struct state *st )
        else if( st->iDegreeCount > 5400 ) st->iDegreeCount = 5400;
        CreateTables( st, st->iDegreeCount );
 #ifdef VERBOSE
-       printf( "%s: Using a %d degree circle.\n", progname );
+       printf( "%s: Using a %d degree circle.\n", progname, st->iDegreeCount );
 #endif /* VERBOSE */
   
        /*  Get the base color. */
@@ -425,16 +430,6 @@ shadebobs_draw (Display *dpy, Window window, void *closure)
   for( st->iShadeBob=0; st->iShadeBob<st->nShadeBobCount; st->iShadeBob++ )
     Execute( st, &st->aShadeBobs[ st->iShadeBob ] );
 
-#ifdef VERBOSE
-  iFrame++;
-  if( nTime - time( NULL ) )
-    {
-      printf( "%s: %d FPS\n", progname, iFrame );
-      nTime = time( NULL );
-      iFrame = 0;
-    }
-#endif  /*  VERBOSE */
-
   return st->delay;
 }