X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fmorph3d.c;fp=hacks%2Fglx%2Fmorph3d.c;h=078044496b5fa57d31990b708f740b7adc8a6cab;hp=4bea5766f90002f2545eb7a9dd62b7a5d1c87e07;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/glx/morph3d.c b/hacks/glx/morph3d.c index 4bea5766..07804449 100644 --- a/hacks/glx/morph3d.c +++ b/hacks/glx/morph3d.c @@ -58,9 +58,9 @@ static const char sccsid[] = "@(#)morph3d.c 5.01 2001/03/01 xlockmore"; "*count: 0 \n" \ "*suppressRotationAnimation: True\n" \ -# define refresh_morph3d 0 +# define free_morph3d 0 # define release_morph3d 0 -# define morph3d_handle_event 0 +# define morph3d_handle_event xlockmore_no_events # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ # include "xlock.h" /* from the xlockmore distribution */ @@ -595,8 +595,14 @@ ENTRYPOINT void reshape_morph3d(ModeInfo * mi, int width, int height) { morph3dstruct *mp = &morph3d[MI_SCREEN(mi)]; + int y = 0; - glViewport(0, 0, mp->WindW = (GLint) width, mp->WindH = (GLint) height); + if (width > height * 5) { /* tiny window: show middle */ + height = width; + y = -height/2; + } + + glViewport(0, y, mp->WindW = (GLint) width, mp->WindH = (GLint) height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); @@ -719,7 +725,7 @@ init_morph3d(ModeInfo * mi) { morph3dstruct *mp; - MI_INIT (mi, morph3d, NULL); + MI_INIT (mi, morph3d); mp = &morph3d[MI_SCREEN(mi)]; mp->step = NRAND(90); mp->VisibleSpikes = 1;