X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fjigsaw.c;h=5185f9b55fe135149cf1c8c8d80dccd5af3e612a;hp=5a415b1756b32d9dff81113a363e3cb8f0ea9f38;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/glx/jigsaw.c b/hacks/glx/jigsaw.c index 5a415b17..5185f9b5 100644 --- a/hacks/glx/jigsaw.c +++ b/hacks/glx/jigsaw.c @@ -59,7 +59,7 @@ "*suppressRotationAnimation: True\n" \ -# define refresh_jigsaw 0 +# define free_jigsaw 0 # define release_jigsaw 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -1325,8 +1325,15 @@ reshape_jigsaw (ModeInfo *mi, int width, int height) { jigsaw_configuration *jc = &sps[MI_SCREEN(mi)]; 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(); @@ -1378,7 +1385,7 @@ init_jigsaw (ModeInfo *mi) jigsaw_configuration *jc; int wire = MI_IS_WIREFRAME(mi); - MI_INIT (mi, sps, NULL); + MI_INIT (mi, sps); jc = &sps[MI_SCREEN(mi)]; jc->glx_context = init_GL(mi);