From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / wormhole.c
index 0e55eabd1b81e4e2e421cb0f2ed5cd23f5cd5f49..4529d5d68b1f37eb0a61714af48287a5b7b845a8 100644 (file)
@@ -1,5 +1,4 @@
-/* xscreensaver, Copyright (c) 1992, 1995, 1996, 1997, 1998, 2004, 2006
- *  Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2011 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -87,7 +86,7 @@ struct state {
 
 /*inline*/ static int rnd( int q )
 {
-
+       if (q < 1) q = 1;
        return random() % q;
 
 }
@@ -709,6 +708,9 @@ static const char *wormhole_defaults [] = {
   "*delay:     10000",
   "*zspeed:    10",
   "*stars:     20",
+#ifdef USE_IPHONE
+  "*ignoreRotation: True",
+#endif
   0
 };