From http://www.jwz.org/xscreensaver/xscreensaver-5.33.tar.gz
[xscreensaver] / hacks / fps.c
index 44171730461de142a3d80c6cd9528bc075f3b1c7..97a2c8b6353337a30ca9b099f30610addcb6113a 100644 (file)
@@ -1,4 +1,4 @@
-/* fps, Copyright (c) 2001-2011 Jamie Zawinski <jwz@jwz.org>
+/* fps, Copyright (c) 2001-2014 Jamie Zawinski <jwz@jwz.org>
  * Draw a frames-per-second display (Xlib and OpenGL).
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -14,6 +14,7 @@
 # include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <time.h>
 #include "screenhackI.h"
 #include "fpsI.h"
 
@@ -56,8 +57,7 @@ fps_init (Display *dpy, Window window)
   st->x = 10;
   st->y = 10;
   if (get_boolean_resource (dpy, "fpsTop", "FPSTop"))
-    /* don't leave a blank line in GL top-fps. */
-    st->y = - (/*st->font->ascent +*/ st->font->descent + 10);
+    st->y = - (st->font->ascent + st->font->descent + 10);
 
   strcpy (st->string, "FPS: ... ");