projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver]
/
hacks
/
glx
/
surfaces.c
diff --git
a/hacks/glx/surfaces.c
b/hacks/glx/surfaces.c
index 459d12245a257e7b1af45c28288872b5ae46aced..9dac523bfb649778a38ad5aae086feccefa4fc75 100644
(file)
--- a/
hacks/glx/surfaces.c
+++ b/
hacks/glx/surfaces.c
@@
-163,7
+163,10
@@
static void draw(ModeInfo *mi)
get_position(sp->rot, &x, &y, &z, !sp->button_down_p);
glTranslatef((x-0.5)*10, (y-0.5)*10, (z-0.5)*20);
get_position(sp->rot, &x, &y, &z, !sp->button_down_p);
glTranslatef((x-0.5)*10, (y-0.5)*10, (z-0.5)*20);
+ /* Do it twice because we don't track the device's orientation. */
+ glRotatef( current_device_rotation(), 0, 0, 1);
gltrackball_rotate(sp->trackball);
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);
get_rotation(sp->rot, &x, &y, &z, !sp->button_down_p);
glRotatef(x*360, 1.0, 0.0, 0.0);