notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
97ea407
)
frontend: commit some debug code
author
notaz
<notasas@gmail.com>
Mon, 28 Feb 2011 23:02:16 +0000
(
01:02
+0200)
committer
notaz
<notasas@gmail.com>
Tue, 1 Mar 2011 15:35:19 +0000
(17:35 +0200)
frontend/pcnt.h
patch
|
blob
|
blame
|
history
diff --git
a/frontend/pcnt.h
b/frontend/pcnt.h
index
0aca901
..
232ae07
100644
(file)
--- a/
frontend/pcnt.h
+++ b/
frontend/pcnt.h
@@
-49,13
+49,25
@@
static inline void pcnt_print(float fps)
}
printf("%4.1f ", 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);
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));
}
memset(pcounters, 0, sizeof(pcounters));
}