http://www.jwz.org/xscreensaver/xscreensaver-5.12.tar.gz
[xscreensaver] / hacks / shadebobs.c
index 72d5aa04f76bb186a04490b89aff8601a6c88cbe..881740c9996ed97fc30fbadae4b5b3f838928c4b 100644 (file)
 static const char *shadebobs_defaults [] = {
   ".background: black",
   ".foreground: white",
+  "*fpsSolid:  true",
   "*degrees:  0",      /* default: Automatic degree calculation */
   "*color:    random",
   "*count:    4",
   "*cycles:   10",
   "*ncolors:  64",    /* changing this doesn't work particularly well */
-  "*delay:    5000",
+  "*delay:    10000",
   0
 };
 
@@ -295,12 +296,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 );
@@ -313,6 +315,7 @@ static void Initialize( struct state *st )
                if( pfv )
                        XFree (pfv);
        }
+#endif
 
        /*  Create the GC. */
        st->gc = XCreateGC( st->dpy, st->window, 0, &gcValues );
@@ -343,7 +346,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. */
@@ -424,16 +427,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;
 }