X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fstairs.c;h=b300ee13c1126b57c3ea588cb091b1b1616c69d5;hp=0bd61c2e62ac0ee19bfe7372e1e2cacf52fe83d8;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/glx/stairs.c b/hacks/glx/stairs.c index 0bd61c2e..b300ee13 100644 --- 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)]; + GLfloat rot = current_device_rotation(); Display *display = MI_DISPLAY(mi); Window window = MI_WINDOW(mi); @@ -509,6 +510,14 @@ draw_stairs (ModeInfo * mi) 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)) { @@ -518,7 +527,6 @@ draw_stairs (ModeInfo * mi) } gltrackball_rotate (sp->trackball); - glRotatef(current_device_rotation(), 0, 0, 1); glTranslatef(0, 0.5, 0); glRotatef(44.5, 1, 0, 0);