X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fslidescreen.c;h=c5656f32c867bc9b20df146b1dc16698fb6deded;hp=190f50711f8f8a205932ebb306dba3955a987fad;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hpb=39809ded547bdbb08207d3e514950425215b4410 diff --git a/hacks/slidescreen.c b/hacks/slidescreen.c index 190f5071..c5656f32 100644 --- a/hacks/slidescreen.c +++ b/hacks/slidescreen.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1992-2014 Jamie Zawinski +/* xscreensaver, Copyright (c) 1992-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 @@ -66,6 +66,9 @@ slidescreen_init (Display *dpy, Window window) st->grid_size = get_integer_resource (st->dpy, "gridSize", "Integer"); st->pix_inc = get_integer_resource (st->dpy, "pixelIncrement", "Integer"); + if (xgwa.width > 2560) st->grid_size *= 2; /* Retina displays */ + + /* Don't let the grid be smaller than 5x5 */ while (st->grid_size > xgwa.width / 5) st->grid_size /= 2; @@ -208,6 +211,8 @@ draw_grid (struct state *st) if (st->bitmap_h < st->grid_size*2) st->bitmap_h = st->grid_size*2; } + if (xgwa.width > 2560) border *= 2; /* Retina displays */ + st->grid_w = st->bitmap_w / st->grid_size; st->grid_h = st->bitmap_h / st->grid_size; st->hole_x = random () % st->grid_w;