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
/
stairs.c
diff --git
a/hacks/glx/stairs.c
b/hacks/glx/stairs.c
index 0bd61c2e62ac0ee19bfe7372e1e2cacf52fe83d8..b300ee13c1126b57c3ea588cb091b1b1616c69d5 100644
(file)
--- a/
hacks/glx/stairs.c
+++ b/
hacks/glx/stairs.c
@@
-496,6
+496,7
@@
ENTRYPOINT void
draw_stairs (ModeInfo * mi)
{
stairsstruct *sp = &stairs[MI_SCREEN(mi)];
draw_stairs (ModeInfo * mi)
{
stairsstruct *sp = &stairs[MI_SCREEN(mi)];
+ GLfloat rot = current_device_rotation();
Display *display = MI_DISPLAY(mi);
Window window = MI_WINDOW(mi);
Display *display = MI_DISPLAY(mi);
Window window = MI_WINDOW(mi);
@@
-509,6
+510,14
@@
draw_stairs (ModeInfo * mi)
glPushMatrix();
glPushMatrix();
+ glRotatef(rot, 0, 0, 1);
+ if ((rot > 45 && rot < 135) ||
+ (rot < -45 && rot > -135))
+ {
+ GLfloat s = MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi);
+ glScalef (s, 1/s, 1);
+ }
+
glTranslatef(0.0, 0.0, -10.0);
if (!MI_IS_ICONIC(mi)) {
glTranslatef(0.0, 0.0, -10.0);
if (!MI_IS_ICONIC(mi)) {
@@
-518,7
+527,6
@@
draw_stairs (ModeInfo * mi)
}
gltrackball_rotate (sp->trackball);
}
gltrackball_rotate (sp->trackball);
- glRotatef(current_device_rotation(), 0, 0, 1);
glTranslatef(0, 0.5, 0);
glRotatef(44.5, 1, 0, 0);
glTranslatef(0, 0.5, 0);
glRotatef(44.5, 1, 0, 0);