X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fendgame.c;fp=hacks%2Fglx%2Fendgame.c;h=ddba7f9c34a43119fcd41e4e81442dc1f8d99739;hp=e69a21c0ec3bbcfad70570ee2ebb1c9e55f55a0f;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/glx/endgame.c b/hacks/glx/endgame.c index e69a21c0..ddba7f9c 100644 --- a/hacks/glx/endgame.c +++ b/hacks/glx/endgame.c @@ -20,7 +20,7 @@ "*showFPS: False \n" \ "*wireframe: False \n" \ -# define refresh_chess 0 +# define free_chess 0 # define release_chess 0 # include "xlockmore.h" @@ -787,7 +787,15 @@ static void display(ModeInfo *mi, Chesscreen *cs) ENTRYPOINT void reshape_chess(ModeInfo *mi, int width, int height) { GLfloat h = (GLfloat) height / (GLfloat) width; - glViewport(0,0, width, height); + int y = 0; + + if (width > height * 5) { /* tiny window: show middle */ + height = width * 9/16; + y = -height/2; + h = height / (GLfloat) width; + } + + glViewport(0,y, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45, 1/h, 2.0, 30.0); @@ -800,7 +808,7 @@ ENTRYPOINT void init_chess(ModeInfo *mi) Chesscreen *cs; int screen = MI_SCREEN(mi); - MI_INIT(mi, qs, NULL); + MI_INIT(mi, qs); cs = &qs[screen]; cs->window = MI_WINDOW(mi);