summaryrefslogtreecommitdiffstats
path: root/hacks/glx/dnalogo.c
diff options
context:
space:
mode:
authorSimon Rettberg2021-04-06 14:43:39 +0200
committerSimon Rettberg2021-04-07 13:38:37 +0200
commit38886de0c3e9ea5729ef23e4c653fa2822f52e8f (patch)
tree9b799c8c968a92cc77746a95e0e8bdd90b6b13c3 /hacks/glx/dnalogo.c
parentMaybe not remove, but ... (diff)
downloadxscreensaver-openslx.tar.gz
xscreensaver-openslx.tar.xz
xscreensaver-openslx.zip
xscreensaver 6.00v28r1openslx
Diffstat (limited to 'hacks/glx/dnalogo.c')
-rw-r--r--hacks/glx/dnalogo.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/hacks/glx/dnalogo.c b/hacks/glx/dnalogo.c
index 3afb73c..bd79c5b 100644
--- a/hacks/glx/dnalogo.c
+++ b/hacks/glx/dnalogo.c
@@ -61,15 +61,9 @@
"*cwFont: " CWFONT "\n" \
"*geometry: =640x640\n" \
-# if defined(HAVE_COCOA) || defined(HAVE_ANDROID)
-# define CWFONT "Yearling 28, OCR A Std 24"
-# else
-# define CWFONT "-*-helvetica-medium-r-normal-*-*-240-*-*-*-*-*-*"
-# endif
+#define CWFONT "Yearling 28, OCR A Std 24, Courier 24"
# define release_logo 0
-#undef countof
-#define countof(x) (sizeof((x))/sizeof((*x)))
#undef DXF_OUTPUT_HACK
@@ -2382,11 +2376,6 @@ codeword_text_output (ModeInfo *mi, GLfloat anim_ratio)
buf[1] = 0;
texture_string_metrics (dc->font, buf, &e, &ascent, &descent);
-# ifdef HAVE_MOBILE
- /* #### Magic magic magic WTF... */
- glScalef (0.5, 0.5, 0.5);
-# endif
-
glTranslatef (-e.width * 1.0,
-(ascent + descent + e.descent * 2.4), /* #### WTF */
0);
@@ -2551,14 +2540,12 @@ draw_codeword_path (ModeInfo *mi)
glColor4fv (dc->codeword_color);
glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, dc->codeword_color);
-# ifdef HAVE_MOBILE /* Make the whole thing fit on the phone screen */
{
- GLfloat size = MI_WIDTH(mi) < MI_HEIGHT(mi) ? MI_WIDTH(mi) : MI_HEIGHT(mi);
- glScalef (0.9, 0.9, 0.9);
- if (size <= 768) /* iPad retina / iPhone 6 */
- glScalef (0.7, 0.7, 0.7);
+ GLfloat s = (MI_WIDTH(mi) < MI_HEIGHT(mi)
+ ? (MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi))
+ : 1);
+ glScalef (s, s, s);
}
-# endif
codeword_text_output (mi, anim_ratio);
@@ -2780,13 +2767,12 @@ reshape_logo (ModeInfo *mi, int width, int height)
0, 0, 0,
0, 1, 0);
-# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */
{
- int o = (int) current_device_rotation();
- if (o != 0 && o != 180 && o != -180)
- glScalef (1/h, 1/h, 1/h); /* #### Why does this change the lighting? */
+ GLfloat s = (MI_WIDTH(mi) < MI_HEIGHT(mi)
+ ? (MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi))
+ : 1);
+ glScalef (s, s, s);
}
-# endif
glClear(GL_COLOR_BUFFER_BIT);
}