X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmenger.c;h=2319af764055d0a0036dae2ff22dde3324423a76;hb=c141c2b05e374757b6499d12bb8a6d4d943b1529;hp=36489fefa8442b63e434f38b47453fbfac70511d;hpb=50be9bb40dc60130c99ffa568e6677779904ff70;p=xscreensaver diff --git a/hacks/glx/menger.c b/hacks/glx/menger.c index 36489fef..2319af76 100644 --- a/hacks/glx/menger.c +++ b/hacks/glx/menger.c @@ -486,7 +486,10 @@ draw_sponge (ModeInfo *mi) (y - 0.5) * 6, (z - 0.5) * 15); + /* Do it twice because we don't track the device's orientation. */ + glRotatef( current_device_rotation(), 0, 0, 1); gltrackball_rotate (sp->trackball); + glRotatef(-current_device_rotation(), 0, 0, 1); get_rotation (sp->rot, &x, &y, &z, !sp->button_down_p); glRotatef (x * 360, 1.0, 0.0, 0.0); @@ -526,6 +529,8 @@ draw_sponge (ModeInfo *mi) ? -sp->current_depth : sp->current_depth)); mi->polygon_count = sp->squares_fp; /* for FPS display */ + mi->recursion_depth = (sp->current_depth < 0 + ? -sp->current_depth : sp->current_depth); } glScalef (2.0, 2.0, 2.0);