X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fxmatrix.c;h=1433527cadb98934f88187983c9180b880c0af45;hp=1cd608010aef21d777cdf90b9a7352a79ddead7b;hb=c28aecf9fc41e3a03494bacf7279745425e2fa18;hpb=723c9eeee862766a1534b2ce17b78adbfac1c3be diff --git a/hacks/xmatrix.c b/hacks/xmatrix.c index 1cd60801..1433527c 100644 --- a/hacks/xmatrix.c +++ b/hacks/xmatrix.c @@ -129,6 +129,7 @@ typedef struct { m_cell *cursor; m_feeder *feeders; int nspinners; + Bool knock_knock_p; Bool small_p; Bool insert_top_p, insert_bottom_p; m_mode mode; @@ -370,6 +371,8 @@ init_matrix (Display *dpy, Window window) if (insert) free (insert); + state->knock_knock_p = get_boolean_resource ("knockKnock", "KnockKnock"); + mode = get_string_resource ("mode", "Mode"); if (mode && !strcasecmp(mode, "trace")) state->mode = TRACE0; @@ -771,7 +774,7 @@ roll_state (m_state *state) break; case MATRIX: - if (! (random() % 5000)) + if (state->knock_knock_p && (! (random() % 5000))) { state->mode = KNOCK0; flip_images (state); @@ -937,6 +940,7 @@ char *defaults [] = { "*tracePhone: (212) 555-0690", "*spinners: 5", "*density: 75", + "*knockKnock: False", 0 }; @@ -953,6 +957,7 @@ XrmOptionDescRec options [] = { { "-dna", ".mode", XrmoptionNoArg, "DNA" }, { "-binary", ".mode", XrmoptionNoArg, "binary" }, { "-hexadecimal", ".mode", XrmoptionNoArg, "hexadecimal"}, + { "-knock-knock", ".knockKnock", XrmoptionNoArg, "True" }, { 0, 0, 0, 0 } };