X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fextrusion.c;h=b175ee4dec5e64ceeac91d2a0b525792d9a25bb3;hp=c61f27a3ed9d1093ebb03fc05ed75f665bb1b532;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/glx/extrusion.c b/hacks/glx/extrusion.c index c61f27a3..b175ee4d 100644 --- a/hacks/glx/extrusion.c +++ b/hacks/glx/extrusion.c @@ -31,7 +31,7 @@ "*showFPS: False \n" \ "*wireframe: False \n" -# define refresh_extrusion 0 +# define free_extrusion 0 # define release_extrusion 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ @@ -383,8 +383,15 @@ ENTRYPOINT void reshape_extrusion (ModeInfo *mi, int width, int height) { GLfloat h = (GLfloat) height / (GLfloat) width; + int y = 0; - glViewport (0, 0, (GLint) width, (GLint) height); + if (width > height * 5) { /* tiny window: show middle */ + height = width * 9/16; + y = -height/2; + h = height / (GLfloat) width; + } + + glViewport (0, y, (GLint) width, (GLint) height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); @@ -530,7 +537,7 @@ init_extrusion (ModeInfo * mi) if (MI_IS_WIREFRAME(mi)) do_light = 0; - MI_INIT(mi, Extrusion, NULL); + MI_INIT(mi, Extrusion); gp = &Extrusion[screen]; gp->window = MI_WINDOW(mi);