X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmorph3d.c;h=e96309acc5817fd2f1f3d2571e481a9f40dc9915;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=5780a30eb94c104099dab7dbefe04df5bd38a2f2;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/glx/morph3d.c b/hacks/glx/morph3d.c index 5780a30e..e96309ac 100644 --- a/hacks/glx/morph3d.c +++ b/hacks/glx/morph3d.c @@ -55,7 +55,9 @@ static const char sccsid[] = "@(#)morph3d.c 5.01 2001/03/01 xlockmore"; # define MODE_moebius # define DEFAULTS "*delay: 40000 \n" \ "*showFPS: False \n" \ - "*count: 0 \n" + "*count: 0 \n" \ + "*suppressRotationAnimation: True\n" \ + # define refresh_morph3d 0 # define morph3d_handle_event 0 # include "xlockmore.h" /* from the xscreensaver distribution */ @@ -606,7 +608,6 @@ pinit(ModeInfo * mi) morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; glClearDepth(1.0); - glClearColor(0.0, 0.0, 0.0, 1.0); glColor3f(1.0, 1.0, 1.0); glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); @@ -771,6 +772,15 @@ draw_morph3d(ModeInfo * mi) glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic); } +# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */ + { + GLfloat h = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi); + int o = (int) current_device_rotation(); + if (o != 0 && o != 180 && o != -180) + glScalef (1/h, h, 1); + } +# endif + glRotatef(mp->step * 100, 1, 0, 0); glRotatef(mp->step * 95, 0, 1, 0); glRotatef(mp->step * 90, 0, 0, 1);