"*showFPS: False \n" \
"*wireframe: False \n"
-# define refresh_extrusion 0
+# define free_extrusion 0
# define release_extrusion 0
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
#ifdef USE_MODULES
ModStruct extrusion_description =
-{"extrusion", "init_extrusion", "draw_extrusion", "release_extrusion",
+{"extrusion", "init_extrusion", "draw_extrusion", NULL,
"draw_extrusion", "init_extrusion", NULL, &extrusion_opts,
1000, 1, 2, 1, 4, 1.0, "",
"OpenGL extrusion", 0, NULL};
reshape_extrusion (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();
if (MI_IS_WIREFRAME(mi)) do_light = 0;
- if (Extrusion == NULL) {
- if ((Extrusion = (extrusionstruct *)
- calloc(MI_NUM_SCREENS(mi), sizeof (extrusionstruct))) == NULL)
- return;
- }
+ MI_INIT(mi, Extrusion);
gp = &Extrusion[screen];
gp->window = MI_WINDOW(mi);