]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed r_speeds to only display timings with r_speeds 2, r_speeds 1 now only display...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 23 Feb 2006 10:34:56 +0000 (10:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 23 Feb 2006 10:34:56 +0000 (10:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6013 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index 03fa361558d01663c11c0bdd0cba10899e323fad..f4e11ba789094955c97ac2b01ba2371b8ddf62ae 100644 (file)
@@ -484,7 +484,7 @@ void R_TimeReport(char *desc)
        int length;
        int t;
 
-       if (!r_timereport_active || r_showtrispass)
+       if (r_speeds.integer < 2 || !r_timereport_active || r_showtrispass)
                return;
 
        qglFinish();
@@ -538,12 +538,16 @@ void R_TimeReport_Start(void)
 
 void R_TimeReport_End(void)
 {
+       int i, j, lines, y;
+
        r_timereport_current = r_timereport_start;
        R_TimeReport("total");
 
-       if (r_timereport_active)
+       j = (int)strlen(r_speeds_string);
+       if (r_timereport_active && j > 0)
        {
-               int i, j, lines, y;
+               if (r_speeds_string[j-1] == '\n')
+                       r_speeds_string[j-1] = 0;
                lines = 1;
                for (i = 0;r_speeds_string[i];i++)
                        if (r_speeds_string[i] == '\n')