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
/
cityflow.c
diff --git
a/hacks/glx/cityflow.c
b/hacks/glx/cityflow.c
index ae1397d6dad951d91359a9bb9a1495dce04f2698..2b3bd4fcea33af810fb1c502d169de385e5cc9c1 100644
(file)
--- a/
hacks/glx/cityflow.c
+++ b/
hacks/glx/cityflow.c
@@
-14,7
+14,7
@@
"*showFPS: False \n" \
"*wireframe: False \n" \
"*showFPS: False \n" \
"*wireframe: False \n" \
-# define
refresh
_cube 0
+# define
free
_cube 0
# define release_cube 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
# define release_cube 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
@@
-99,8
+99,15
@@
ENTRYPOINT void
reshape_cube (ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
reshape_cube (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 * 2) { /* tiny window: show middle */
+ height = width;
+ y = -height/2;
+ h = height / (GLfloat) width;
+ }
+
+ glViewport (0, y, (GLint) width, (GLint) height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@@
-290,7
+297,7
@@
init_cube (ModeInfo *mi)
int i;
cube_configuration *cc;
int i;
cube_configuration *cc;
- MI_INIT (mi, ccs
, NULL
);
+ MI_INIT (mi, ccs);
cc = &ccs[MI_SCREEN(mi)];
cc = &ccs[MI_SCREEN(mi)];