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
/
unknownpleasures.c
diff --git
a/hacks/glx/unknownpleasures.c
b/hacks/glx/unknownpleasures.c
index eac67f44ae74c5c6f828fc097b3fc10936eb89ca..98025663cb2c5ef699d3dc582339cd3f7a22b77b 100644
(file)
--- a/
hacks/glx/unknownpleasures.c
+++ b/
hacks/glx/unknownpleasures.c
@@
-41,7
+41,7
@@
"*wireframe: False \n" \
"*geometry: =800x800" "\n" \
"*wireframe: False \n" \
"*geometry: =800x800" "\n" \
-# define
refresh
_unk 0
+# define
free
_unk 0
# define release_unk 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
# define release_unk 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
@@
-92,8
+92,15
@@
reshape_unk (ModeInfo *mi, int width, int height)
{
unk_configuration *bp = &bps[MI_SCREEN(mi)];
GLfloat h = (GLfloat) height / (GLfloat) width;
{
unk_configuration *bp = &bps[MI_SCREEN(mi)];
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*1.5;
+ y = -height/2;
+ h = height / (GLfloat) width;
+ }
+
+ glViewport (0, y, (GLint) width, (GLint) height);
if (bp->orthop)
{
if (bp->orthop)
{
@@
-175,7
+182,7
@@
init_unk (ModeInfo *mi)
{
unk_configuration *bp;
{
unk_configuration *bp;
- MI_INIT (mi, bps
, NULL
);
+ MI_INIT (mi, bps);
bp = &bps[MI_SCREEN(mi)];
bp = &bps[MI_SCREEN(mi)];
@@
-372,7
+379,7
@@
draw_unk (ModeInfo *mi)
xinc *= 2;
*/
xinc *= 2;
*/
-# endif /*
US
E_MOBILE */
+# endif /*
HAV
E_MOBILE */
/* Make the image fill the screen a little more fully */
/* Make the image fill the screen a little more fully */