http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.14.tar.gz
[xscreensaver] / hacks / glx / lavalite.c
index e40fdc0306c518e67959dcf6b9f85374553ed294..743d6575542da3501392d1f21730cc6a00026f99 100644 (file)
@@ -96,6 +96,7 @@ extern XtAppContext app;
 #define DEFAULTS       "*delay:        10000       \n" \
                        "*showFPS:      False       \n" \
                        "*wireframe:    False       \n" \
+                       "*geometry:     640x640     \n" \
                        "*count:      " DEF_COUNT " \n" \
                        "*style:      " DEF_STYLE " \n" \
                        "*speed:      " DEF_SPEED " \n" \
@@ -557,7 +558,7 @@ draw_wing (GLfloat w, GLfloat h, GLfloat d, Bool wire)
   int polys = 0;
   int maxx = coords[0][countof(coords[0])-1][0];
   int maxy = coords[0][countof(coords[0])-1][1];
-  int x;
+  unsigned int x;
 
   for (x = 1; x < countof(coords[0]); x++)
     {
@@ -1237,7 +1238,10 @@ animate_lava (ModeInfo *mi)
 
   mi->polygon_count = 0;
   {
-    double s = 1.0/bp->grid_size;
+    double s;
+    if (bp->grid_size == 0) bp->grid_size = 1;  /* first time through */
+    s = 1.0/bp->grid_size;
+
     glPushMatrix();
     glTranslatef (-0.5, -0.5, 0);
     glScalef (s, s, s);