aboutsummaryrefslogtreecommitdiff
path: root/frontend/pcnt.h
diff options
context:
space:
mode:
authornotaz2011-03-01 01:02:16 +0200
committernotaz2011-03-01 17:35:19 +0200
commitfc42805bfb38d33e23b4eddb115cf9ab88a4345a (patch)
treeeed44c0bd330c31a00071bb6d26ca074056b6486 /frontend/pcnt.h
parent97ea407715c0eafc8d73ffc5477f6d7e6ad8f20b (diff)
downloadpcsx_rearmed-fc42805bfb38d33e23b4eddb115cf9ab88a4345a.tar.gz
pcsx_rearmed-fc42805bfb38d33e23b4eddb115cf9ab88a4345a.tar.bz2
pcsx_rearmed-fc42805bfb38d33e23b4eddb115cf9ab88a4345a.zip
frontend: commit some debug code
Diffstat (limited to 'frontend/pcnt.h')
-rw-r--r--frontend/pcnt.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/frontend/pcnt.h b/frontend/pcnt.h
index 0aca901..232ae07 100644
--- a/frontend/pcnt.h
+++ b/frontend/pcnt.h
@@ -49,13 +49,25 @@ static inline void pcnt_print(float fps)
}
printf("%4.1f ", fps);
+#if 0
+ static float pcounters_all[PCNT_CNT+1];
+ static int pcounter_samples;
+ pcounter_samples++;
+
+ for (i = 1; i < PCNT_CNT; i++) {
+ pcounters_all[i] += pcounters[i];
+ printf("%5.0f ", pcounters_all[i] / pcounter_samples);
+ }
+ pcounters_all[i] += rem;
+ printf("%5.0f\n", pcounters_all[i] / pcounter_samples);
+#else
for (i = 1; i < PCNT_CNT; i++)
printf("%5u ", pcounters[i]);
printf("%5u (", rem);
for (i = 1; i < PCNT_CNT; i++)
printf("%2u ", pcounters[i] * 100 / total);
printf("%2u) %u\n", rem * 100 / total, total);
-
+#endif
memset(pcounters, 0, sizeof(pcounters));
}