X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fpenetrate.c;h=9148827ded81a1113f72e0b59def83e629921bf5;hp=a58efa21b3bf5883be211667114b98b895b2023b;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hpb=39809ded547bdbb08207d3e514950425215b4410 diff --git a/hacks/penetrate.c b/hacks/penetrate.c index a58efa21..9148827d 100644 --- a/hacks/penetrate.c +++ b/hacks/penetrate.c @@ -388,23 +388,11 @@ penetrate_init (Display *dpy, Window window) if (st->lrate < 0) st->lrate = 2; st->startlrate = st->lrate; - st->font = XLoadQueryFont(st->dpy, levelfont); - if (!st->font) { - fprintf (stderr, "%s: could not load font %s.\n", progname, levelfont); - st->font = XLoadQueryFont(st->dpy, scorefont); - if (! st->font) - st->font = XLoadQueryFont(st->dpy, "fixed"); - if (! st->font) abort(); - } + st->font = load_font_retry(st->dpy, levelfont); + if (!st->font) abort(); - st->scoreFont = XLoadQueryFont(st->dpy, scorefont); - if (!st->scoreFont) { - fprintf (stderr, "%s: could not load font %s.\n", progname, scorefont); - st->scoreFont = XLoadQueryFont(st->dpy, levelfont); - if (! st->scoreFont) - st->scoreFont = XLoadQueryFont(st->dpy, "fixed"); - if (! st->scoreFont) abort(); - } + st->scoreFont = load_font_retry(st->dpy, scorefont); + if (!st->scoreFont) abort(); for (i = 0; i < kMaxMissiles; i++) st->missile[i].alive = 0;