X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fmemscroller.c;h=ee1e1b54cbe03b6b2246628c235a3e57fd4f13e7;hb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;hp=fca2459e8a0de7d4ff3f8ffa5a8a159f45ae718d;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/memscroller.c b/hacks/memscroller.c index fca2459e..ee1e1b54 100644 --- a/hacks/memscroller.c +++ b/hacks/memscroller.c @@ -38,7 +38,7 @@ typedef struct { Window window; XWindowAttributes xgwa; GC draw_gc, erase_gc, text_gc; - XFontStruct *fonts[4]; + XFontStruct *fonts[6]; int border; enum { SEED_RAM, SEED_RANDOM, SEED_FILE } seed_mode; @@ -336,8 +336,8 @@ more_bits (state *st, scroller *sc) if ((unsigned long) himem - (unsigned long) lomem > 0x0FFFFFFF) { # if 0 fprintf (stderr, "%s: wonky: 0x%08x - 0x%08x = 0x%08x\n", progname, - (unsigned long) himem, (unsigned long) lomem, - (unsigned long) himem - (unsigned long) lomem); + (unsigned int) himem, (unsigned int) lomem, + (unsigned int) himem - (unsigned int) lomem); # endif himem = lomem + 0xFFFF; } @@ -483,7 +483,7 @@ draw_string (state *st) x = (st->xgwa.width - w) / 2; y = (bot - h) / 2; - if (y + h + 10 <= bot) + if (y + h + 10 <= bot && x > -10) { XSetFont (st->dpy, st->text_gc, st->fonts[i]->fid); XFillRectangle (st->dpy, st->window, st->erase_gc, @@ -580,14 +580,27 @@ memscroller_free (Display *dpy, Window window, void *closure) static const char *memscroller_defaults [] = { ".background: black", "*drawMode: color", + "*fpsSolid: true", + "*fpsTop: true", "*filename: (RAM)", ".textColor: #00FF00", ".foreground: #00FF00", "*borderSize: 2", - ".font1: -*-courier-medium-r-*-*-*-1400-*-*-m-*-*-*", - ".font2: -*-courier-medium-r-*-*-*-600-*-*-m-*-*-*", - ".font3: -*-courier-medium-r-*-*-*-180-*-*-m-*-*-*", - ".font4: fixed", +#ifdef HAVE_COCOA + ".font1: OCR A Std 192", + ".font2: OCR A Std 144", + ".font3: OCR A Std 128", + ".font4: OCR A Std 96", + ".font5: OCR A Std 48", + ".font6: OCR A Std 24", +#else + ".font1: -*-courier-bold-r-*-*-*-1440-*-*-m-*-*-*", + ".font2: -*-courier-bold-r-*-*-*-960-*-*-m-*-*-*", + ".font3: -*-courier-bold-r-*-*-*-480-*-*-m-*-*-*", + ".font4: -*-courier-bold-r-*-*-*-320-*-*-m-*-*-*", + ".font5: -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*", + ".font6: fixed", +#endif "*delay: 10000", "*offset: 0", 0