X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fcubicgrid.c;h=400af7437f27eb6a2641ae39fdc58b05847b4e35;hp=deb6774c497e4962b40730644793fbc7c7e51863;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/glx/cubicgrid.c b/hacks/glx/cubicgrid.c index deb6774c..400af743 100644 --- a/hacks/glx/cubicgrid.c +++ b/hacks/glx/cubicgrid.c @@ -141,7 +141,12 @@ static Bool draw_main(cubicgrid_conf *cp) glTranslatef(0, 0, zpos); glScalef(size/ticks, size/ticks, size/ticks); + + /* Do it twice because we don't track the device's orientation. */ + glRotatef( current_device_rotation(), 0, 0, 1); gltrackball_rotate (cp->trackball); + glRotatef(-current_device_rotation(), 0, 0, 1); + get_rotation (cp->rot, &x, &y, &z, !cp->button_down_p); glRotatef (x * 360, 1.0, 0.0, 0.0); glRotatef (y * 360, 0.0, 1.0, 0.0);