From http://www.jwz.org/xscreensaver/xscreensaver-5.30.tar.gz
[xscreensaver] / hacks / glx / glhanoi.c
index d8d3d2a2dd9428ca8d7fd4b60e3a3ab46955a9ec..f9bc6fe0d2aef93a6194938d7dfdf0f681eb003c 100644 (file)
@@ -1666,7 +1666,6 @@ static void initTowers(glhcfg *glhanoi)
                glPopMatrix();
 
        }
-       glPopMatrix();
        glEndList();
 }
 
@@ -1891,6 +1890,11 @@ ENTRYPOINT void init_glhanoi(ModeInfo * mi)
                (int)((1 - sqrt(frand(1.0))) * (glhanoi->numberOfDisks - 1));
        
        glhanoi->wire = MI_IS_WIREFRAME(mi);
+
+# ifdef HAVE_JWZGLES /* #### glPolygonMode other than GL_FILL unimplemented */
+    glhanoi->wire = 0;
+# endif
+
        glhanoi->light = light;
        glhanoi->fog = fog;
        glhanoi->texture = texture;
@@ -1959,6 +1963,7 @@ ENTRYPOINT void draw_glhanoi(ModeInfo * mi)
     mi->polygon_count = 0;
 
        glLoadIdentity();
+    glRotatef(current_device_rotation(), 0, 0, 1);
 
        update_glhanoi(glhanoi);
        updateView(glhanoi);
@@ -2025,6 +2030,13 @@ ENTRYPOINT Bool glhanoi_handle_event(ModeInfo * mi, XEvent * event)
 
                return True;
        }
+#if 0 /* #### doesn't work */
+  else if (screenhack_event_helper (MI_DISPLAY(mi), MI_WINDOW(mi), event))
+    {
+      changeState(glhanoi, START);
+      return True;
+    }
+#endif
        return False;
 }