projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.38.tar.gz
[xscreensaver]
/
hacks
/
glx
/
endgame.c
diff --git
a/hacks/glx/endgame.c
b/hacks/glx/endgame.c
index e69a21c0ec3bbcfad70570ee2ebb1c9e55f55a0f..ddba7f9c34a43119fcd41e4e81442dc1f8d99739 100644
(file)
--- a/
hacks/glx/endgame.c
+++ b/
hacks/glx/endgame.c
@@
-20,7
+20,7
@@
"*showFPS: False \n" \
"*wireframe: False \n" \
"*showFPS: False \n" \
"*wireframe: False \n" \
-# define
refresh
_chess 0
+# define
free
_chess 0
# define release_chess 0
# include "xlockmore.h"
# 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;
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);
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);
Chesscreen *cs;
int screen = MI_SCREEN(mi);
- MI_INIT(mi, qs
, NULL
);
+ MI_INIT(mi, qs);
cs = &qs[screen];
cs->window = MI_WINDOW(mi);
cs = &qs[screen];
cs->window = MI_WINDOW(mi);