X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fgears.c;h=bd055982f237508dd386f6ac326d9af44fcfe1f9;hp=2f27ba0c3fcc5e98a5201b418801313c33d6769d;hb=0d6b320def9180cf907ceaed56b23a972a11b757;hpb=3f438031d610c7e15fd33876a879b97e290e05fb diff --git a/hacks/glx/gears.c b/hacks/glx/gears.c index 2f27ba0c..bd055982 100644 --- a/hacks/glx/gears.c +++ b/hacks/glx/gears.c @@ -61,16 +61,21 @@ static const char sccsid[] = "@(#)gears.c 4.07 97/11/24 xlockmore"; #define countof(x) (sizeof((x))/sizeof((*x))) #define DEF_PLANETARY "False" +#define DEF_SPIN "True" static int planetary; +static int spin; static XrmOptionDescRec opts[] = { {"-planetary", ".gears.planetary", XrmoptionNoArg, "true" }, {"+planetary", ".gears.planetary", XrmoptionNoArg, "false" }, + {"-spin", ".gears.spin", XrmoptionNoArg, "true" }, + {"+spin", ".gears.spin", XrmoptionNoArg, "false" }, }; static argtype vars[] = { {&planetary, "planetary", "Planetary", DEF_PLANETARY, t_Bool}, + {&spin, "spin", "Spin", DEF_SPIN, t_Bool}, }; ModeSpecOpt gears_opts = {countof(opts), opts, countof(vars), vars, NULL}; @@ -535,13 +540,14 @@ draw(ModeInfo * mi) gltrackball_rotate (gp->trackball); - { - double x, y, z; - get_rotation (gp->rot, &x, &y, &z, !gp->button_down_p); - glRotatef (x * 360, 1.0, 0.0, 0.0); - glRotatef (y * 360, 0.0, 1.0, 0.0); - glRotatef (z * 360, 0.0, 0.0, 1.0); - } + if (spin) + { + double x, y, z; + get_rotation (gp->rot, &x, &y, &z, !gp->button_down_p); + glRotatef (x * 360, 1.0, 0.0, 0.0); + glRotatef (y * 360, 0.0, 1.0, 0.0); + glRotatef (z * 360, 0.0, 0.0, 1.0); + } if (!planetary) { glPushMatrix();