X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fpolytopes.c;h=76c1287363a10ba537a13d1ad85d7c57bd152b29;hp=0b4d68481d7c7718d2f496075540fa26a5cb3168;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/glx/polytopes.c b/hacks/glx/polytopes.c index 0b4d6848..76c12873 100644 --- a/hacks/glx/polytopes.c +++ b/hacks/glx/polytopes.c @@ -93,7 +93,7 @@ static const char sccsid[] = "@(#)polytopes.c 1.2 05/09/28 xlockmore"; "*showFPS: False \n" \ "*suppressRotationAnimation: True\n" \ -# define refresh_polytopes 0 +# define free_polytopes 0 # define release_polytopes 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ @@ -2863,10 +2863,16 @@ static void display_polytopes(ModeInfo *mi) ENTRYPOINT void reshape_polytopes(ModeInfo *mi, int width, int height) { polytopesstruct *pp = &poly[MI_SCREEN(mi)]; + int y = 0; + + if (width > height * 5) { /* tiny window: show middle */ + height = width; + y = -height/2; + } pp->WindW = (GLint)width; pp->WindH = (GLint)height; - glViewport(0,0,width,height); + glViewport(0,y,width,height); pp->aspect = (GLfloat)width/(GLfloat)height; } @@ -2949,7 +2955,7 @@ ENTRYPOINT void init_polytopes(ModeInfo *mi) { polytopesstruct *pp; - MI_INIT(mi, poly, NULL); + MI_INIT(mi, poly); pp = &poly[MI_SCREEN(mi)]; pp->trackballs[0] = gltrackball_init(True);