X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fcompass.c;h=1dc1d3ea7a4ccbda961e9c9abf94dc6ca5f73bb2;hp=9d62870f6d163be6a6107a588f43930ee97019b8;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hpb=39809ded547bdbb08207d3e514950425215b4410 diff --git a/hacks/compass.c b/hacks/compass.c index 9d62870f..1dc1d3ea 100644 --- a/hacks/compass.c +++ b/hacks/compass.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1999 Jamie Zawinski +/* xscreensaver, Copyright (c) 1999-2018 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -833,7 +833,11 @@ compass_init (Display *dpy, Window window) st->xgwa.height > st->xgwa.width * 5) st->size2 = MAX(st->xgwa.width, st->xgwa.height); - if (st->size2 > 600) st->size2 = 600; + { + int max = 600; + if (st->xgwa.width > 2560) max *= 2; /* Retina displays */ + if (st->size2 > max) st->size2 = max; + } st->size = (st->size2 / 2) * 0.8;