X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fbarcode.c;h=31574bd214049472ed49177241dc2c08a33eeddb;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hp=cd3038ce534b1bf4fc109b621232a387bb3bf6db;hpb=aa75c7476aeaa84cf3abc192b376a8b03c325213;p=xscreensaver diff --git a/hacks/barcode.c b/hacks/barcode.c index cd3038ce..31574bd2 100644 --- a/hacks/barcode.c +++ b/hacks/barcode.c @@ -1635,6 +1635,12 @@ static void scrollModel (struct state *st) st->barcodes[st->barcode_count - 1].mag * BARCODE_WIDTH); barcode->x += RAND_FLOAT_01 * 100; barcode->mag = RAND_FLOAT_01 * MAX_MAG; + + if (st->windowWidth < 100 || st->windowHeight < 100) { + barcode->mag *= 0.5; + if (barcode->mag <= 0) barcode->mag = 1; + } + barcode->y = RAND_FLOAT_01 * (st->windowHeight - BARCODE_HEIGHT * barcode->mag); if (barcode->y < 0) @@ -1915,6 +1921,7 @@ barcode_free (Display *dpy, Window window, void *closure) static const char *barcode_defaults [] = { ".background: black", ".foreground: green", + ".lowrez: true", "*fpsSolid: true", "*delay: 10000", "*mode: scroll",