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
/
polyhedra-gl.c
diff --git
a/hacks/glx/polyhedra-gl.c
b/hacks/glx/polyhedra-gl.c
index a46453348f6ba7b861ee65f26f7a4a0e1cfdb149..507d295790768be406a9086e3f4f0e7feb427589 100644
(file)
--- a/
hacks/glx/polyhedra-gl.c
+++ b/
hacks/glx/polyhedra-gl.c
@@
-24,7
+24,7
@@
"*suppressRotationAnimation: True\n" \
"*suppressRotationAnimation: True\n" \
-# define
refresh
_polyhedra 0
+# define
free
_polyhedra 0
# define release_polyhedra 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
# define release_polyhedra 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
@@
-201,8
+201,15
@@
ENTRYPOINT void
reshape_polyhedra (ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
reshape_polyhedra (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();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@@
-462,7
+469,7
@@
init_polyhedra (ModeInfo *mi)
wire = 0;
# endif
wire = 0;
# endif
- MI_INIT (mi, bps
, NULL
);
+ MI_INIT (mi, bps);
bp = &bps[MI_SCREEN(mi)];
bp = &bps[MI_SCREEN(mi)];