X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fjigglypuff.c;h=2e94c1d498bb7ddef3b01517e4459c8133e17473;hp=a65e99fa94acfd4897688fe27d0b523753833ab3;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hpb=88cfe534a698a0562e81345957a50714af1453bc diff --git a/hacks/glx/jigglypuff.c b/hacks/glx/jigglypuff.c index a65e99fa..2e94c1d4 100644 --- a/hacks/glx/jigglypuff.c +++ b/hacks/glx/jigglypuff.c @@ -39,6 +39,7 @@ # define DEFAULTS "*delay: 20000\n" \ "*showFPS: False\n" \ "*wireframe: False\n" \ + "*suppressRotationAnimation: True\n" \ # define refresh_jigglypuff 0 # define release_jigglypuff 0 @@ -960,6 +961,16 @@ ENTRYPOINT void draw_jigglypuff(ModeInfo *mi) glLoadIdentity(); glTranslatef(0,0,-10); + +# 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 + glRotatef(js->angle, sin(js->axis), cos(js->axis), -sin(js->axis)); glTranslatef(0, 0, 5); if(!(js->button_down)) {