From http://www.jwz.org/xscreensaver/xscreensaver-5.27.tar.gz
[xscreensaver] / hacks / pong.c
index 021fe1d716c1aff13b1500b851a502572e258a8c..38e1d844f7d8bf23da936c32ce9526fdaa770c6b 100644 (file)
@@ -678,6 +678,7 @@ static unsigned long
 pong_draw (Display *dpy, Window window, void *closure)
 {
   struct state *st = (struct state *) closure;
+  const analogtv_reception *reception = &st->reception;
 
   if (st->clock)
   {
@@ -737,12 +738,14 @@ pong_draw (Display *dpy, Window window, void *closure)
   }
   if (1) paint_ball(st);
 
-  analogtv_init_signal(st->tv, st->noise);
   analogtv_reception_update(&st->reception);
-  analogtv_add_signal(st->tv, &st->reception);
-  analogtv_draw(st->tv);
+  analogtv_draw(st->tv, st->noise, &reception, 1);
 
-  return 10000;
+#ifdef USE_IPHONE
+  return 0;
+#else
+  return 5000;
+#endif
 }
 
 \f
@@ -754,7 +757,6 @@ static const char *pong_defaults [] = {
   "*noise:      0.04",
   "*clock:      false",
   ANALOGTV_DEFAULTS
-  "*TVContrast:      150",
   0
 };
 
@@ -788,4 +790,4 @@ pong_free (Display *dpy, Window window, void *closure)
   free (st);
 }
 
-XSCREENSAVER_MODULE ("pong", pong)
+XSCREENSAVER_MODULE ("Pong", pong)