X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Ffps.c;h=44171730461de142a3d80c6cd9528bc075f3b1c7;hb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;hp=8a63ccff7fbabdd119fda1b0c55697d3f9c808e0;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823;p=xscreensaver diff --git a/hacks/fps.c b/hacks/fps.c index 8a63ccff..44171730 100644 --- a/hacks/fps.c +++ b/hacks/fps.c @@ -56,7 +56,8 @@ fps_init (Display *dpy, Window window) st->x = 10; st->y = 10; if (get_boolean_resource (dpy, "fpsTop", "FPSTop")) - st->y = - (st->font->ascent + st->font->descent + 10); + /* don't leave a blank line in GL top-fps. */ + st->y = - (/*st->font->ascent +*/ st->font->descent + 10); strcpy (st->string, "FPS: ... "); @@ -152,7 +153,7 @@ fps_compute (fps_state *st, unsigned long polys, double depth) if (depth >= 0.0) { - int L = strlen (st->string); + unsigned long L = strlen (st->string); char *s = st->string + L; strcat (s, "\nDepth: "); sprintf (s + strlen(s), "%.1f", depth); @@ -198,7 +199,7 @@ string_width (XFontStruct *f, const char *c, int *height_ret) } -/* This function is used only in Xlib mode. For GL mode, see glx/fps-glx.c. +/* This function is used only in Xlib mode. For GL mode, see glx/fps-gl.c. */ void fps_draw (fps_state *st) @@ -241,7 +242,7 @@ fps_draw (fps_state *st) s = strchr (string, '\n'); if (! s) s = string + strlen(string); XDrawString (st->dpy, st->window, st->draw_gc, - x, y, string, s - string); + x, y, string, (int) (s - string)); string = s; string++; lines--;