From http://www.jwz.org/xscreensaver/xscreensaver-5.39.tar.gz
[xscreensaver] / hacks / fuzzyflakes.c
index 1941d142b7f7ab3946f8bc10c124078ed1d41475..18470bcb56de94eab6b0814df94d28112ad7d2b4 100644 (file)
@@ -314,15 +314,13 @@ FuzzyFlakesInit(Flake *flake)
 {
    int                 i, j;
    XWindowAttributes   xgwa;
-   Colormap            cmap;
 
    XGetWindowAttributes(flake->dpy, flake->window, &xgwa);
-   cmap = xgwa.colormap;
    flake->XGWA = xgwa;
    flake->DB.b = flake->DB.ba = flake->DB.bb = 0;
    flake->DB.dbuf = get_boolean_resource(flake->dpy, "doubleBuffer", "Boolean");
 
-# ifdef HAVE_COCOA     /* Don't second-guess Quartz's double-buffering */
+# ifdef HAVE_JWXYZ     /* Don't second-guess Quartz's double-buffering */
    flake->DB.dbuf = False;
 # endif
 
@@ -351,6 +349,13 @@ FuzzyFlakesInit(Flake *flake)
    if (flake->RandomColors == True)
       flake->RandomColors = get_boolean_resource(flake->dpy, "randomColors", "Boolean");
 
+   if (xgwa.width > 2560) {  /* Retina displays */
+     flake->Thickness *= 2;
+     flake->BorderThickness *= 2;
+     flake->Radius *= 2;
+     flake->FallingSpeed *= 2;
+   }
+
    if (flake->Delay < 0)
       flake->Delay = 0;