X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fstarwars.c;h=1efcd154c321d84ffd6e9e4c38790cccab820089;hp=d75f014c12a449827561f9683bbdf7ec6e0b3d0f;hb=78add6e627ee5f10e1fa6f3852602ea5066eee5a;hpb=39809ded547bdbb08207d3e514950425215b4410 diff --git a/hacks/glx/starwars.c b/hacks/glx/starwars.c index d75f014c..1efcd154 100644 --- a/hacks/glx/starwars.c +++ b/hacks/glx/starwars.c @@ -1,4 +1,4 @@ -/* starwars, Copyright (c) 1998-2015 Jamie Zawinski and +/* starwars, Copyright (c) 1998-2018 Jamie Zawinski and * Claudio Matsuoka * * Permission to use, copy, modify, distribute, and sell this software and its @@ -568,6 +568,12 @@ init_stars (ModeInfo *mi, int width, int height) int max_size = 3; GLfloat inc = 0.5; int steps = max_size / inc; + GLfloat scale = 1; + + if (MI_WIDTH(mi) > 2560) { /* Retina displays */ + scale *= 2; + nstars = (size/scale) * (size/scale) / 320; + } glDeleteLists (sc->star_list, 1); sc->star_list = glGenLists (1); @@ -577,7 +583,7 @@ init_stars (ModeInfo *mi, int width, int height) for (j = 1; j <= steps; j++) { - glPointSize(inc * j); + glPointSize(inc * j * scale); glBegin (GL_POINTS); for (i = 0; i < nstars / steps; i++) {