X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fpolyhedra-gl.c;h=a46453348f6ba7b861ee65f26f7a4a0e1cfdb149;hp=b931069ce37f243b3819ab85fc49ff2f803bf396;hb=4361b69d3178d7fc98d0388f9a223af6c2651aba;hpb=d5186197bc394e10a4402f7f6d23fbb14103bc50 diff --git a/hacks/glx/polyhedra-gl.c b/hacks/glx/polyhedra-gl.c index b931069c..a4645334 100644 --- a/hacks/glx/polyhedra-gl.c +++ b/hacks/glx/polyhedra-gl.c @@ -21,6 +21,7 @@ "*titleFont: -*-helvetica-medium-r-normal-*-*-140-*-*-*-*-*-*\n" \ "*titleFont2: -*-helvetica-medium-r-normal-*-*-100-*-*-*-*-*-*\n" \ "*titleFont3: -*-helvetica-medium-r-normal-*-*-80-*-*-*-*-*-*\n" \ + "*suppressRotationAnimation: True\n" \ # define refresh_polyhedra 0 @@ -30,7 +31,7 @@ #include "xlockmore.h" -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ # include "jwxyz.h" #else # include @@ -57,7 +58,7 @@ #include "gltrackball.h" #include "teapot.h" -#ifndef HAVE_COCOA +#ifndef HAVE_JWXYZ # define XK_MISCELLANY # include #endif @@ -461,14 +462,7 @@ init_polyhedra (ModeInfo *mi) wire = 0; # endif - if (!bps) { - bps = (polyhedra_configuration *) - calloc (MI_NUM_SCREENS(mi), sizeof (polyhedra_configuration)); - if (!bps) { - fprintf(stderr, "%s: out of memory\n", progname); - exit(1); - } - } + MI_INIT (mi, bps, NULL); bp = &bps[MI_SCREEN(mi)]; @@ -625,6 +619,15 @@ draw_polyhedra (ModeInfo *mi) glPushMatrix (); +# 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, 1/h, 1/h); + } +# endif + glScalef(1.1, 1.1, 1.1); {