projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.39.tar.gz
[xscreensaver]
/
hacks
/
glx
/
starwars.c
diff --git
a/hacks/glx/starwars.c
b/hacks/glx/starwars.c
index d75f014c12a449827561f9683bbdf7ec6e0b3d0f..1efcd154c321d84ffd6e9e4c38790cccab820089 100644
(file)
--- a/
hacks/glx/starwars.c
+++ b/
hacks/glx/starwars.c
@@
-1,4
+1,4
@@
-/* starwars, Copyright (c) 1998-201
5
Jamie Zawinski <jwz@jwz.org> and
+/* starwars, Copyright (c) 1998-201
8
Jamie Zawinski <jwz@jwz.org> and
* Claudio Matsuoka <claudio@helllabs.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* Claudio Matsuoka <claudio@helllabs.org>
*
* 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;
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);
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++)
{
for (j = 1; j <= steps; j++)
{
- glPointSize(inc * j);
+ glPointSize(inc * j
* scale
);
glBegin (GL_POINTS);
for (i = 0; i < nstars / steps; i++)
{
glBegin (GL_POINTS);
for (i = 0; i < nstars / steps; i++)
{