"*showFPS: False \n" \
"*wireframe: False \n" \
-# define refresh_chess 0
+# define free_chess 0
# define release_chess 0
# include "xlockmore.h"
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);
Chesscreen *cs;
int screen = MI_SCREEN(mi);
- MI_INIT(mi, qs, NULL);
+ MI_INIT(mi, qs);
cs = &qs[screen];
cs->window = MI_WINDOW(mi);