From fcbab89545cded3ea5df868cd30f72401f287ed2 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 21 Aug 2010 22:32:52 +0000 Subject: [PATCH] Whoops, forgot to fix this part. --- src/emu/profiler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/emu/profiler.c b/src/emu/profiler.c index fa8d6eeb900..1faca5c6de2 100644 --- a/src/emu/profiler.c +++ b/src/emu/profiler.c @@ -208,7 +208,7 @@ const char *real_profiler_state::text(running_machine &machine, astring &string) { PROFILER_IDLE, "Idle" } }; - profiler_scope profile(PROFILER_PROFILER); + g_profiler.start(PROFILER_PROFILER); // compute the total time for all bits, not including profiler or idle UINT64 computed = 0; @@ -227,7 +227,10 @@ const char *real_profiler_state::text(running_machine &machine, astring &string) UINT64 total = computed; string.reset(); if (total == 0 || normalize == 0) + { + g_profiler.stop(); return string; + } // loop over all types and generate the string for (curtype = PROFILER_DEVICE_FIRST; curtype < PROFILER_TOTAL; curtype++) @@ -279,5 +282,7 @@ const char *real_profiler_state::text(running_machine &machine, astring &string) // we are ready once we have wrapped around if (m_dataindex == 0) m_dataready = true; + + g_profiler.stop(); return string; }