X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Frubikblocks.c;h=86968ad97d52731291e93831c204e12742df9e85;hp=e8caf32f140d18a94205848a1f5a5224a018bec9;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/glx/rubikblocks.c b/hacks/glx/rubikblocks.c index e8caf32f..86968ad9 100644 --- a/hacks/glx/rubikblocks.c +++ b/hacks/glx/rubikblocks.c @@ -262,7 +262,12 @@ draw_main(ModeInfo *mi, rubikblocks_conf *cp) glLoadIdentity(); get_position(cp->rot, &x, &y, &z, !cp->button_down); glTranslatef((x-0.5)*6, (y-0.5)*6, -20); + + /* 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); glRotatef(x*360, 1, 0, 0); glRotatef(y*360, 0, 1, 0);