summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-01-02 10:52:40 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-01-02 10:52:40 +0000
commit0b2c86bb027be56f7e5eb7ea490d995e847b290b (patch)
treeadefbc1327b149e91039f39da5fc8a012f39fe1d /src/emu/ui.c
parentba92f06dd71242b62ecc27363b9b14fc6d42063d (diff)
Cleaned up the profiler. Reduced its runtime overhead significantly by
inlining the check to see if it is running. Removed obsolete entries and updated the text to more accurately describe each one. Added CPU tags to the CPU names. Switched to using an astring for building the final string. Unfortunately, still a bit too much overhead to leave it on in all builds.
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r--src/emu/ui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c
index 92d1257a1ef..d7cca01f415 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -1167,7 +1167,11 @@ static UINT32 handler_ingame(running_machine *machine, UINT32 state)
/* draw the profiler if visible */
if (show_profiler)
- ui_draw_text_full(profiler_get_text(machine), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
+ {
+ astring *profilertext = profiler_get_text(machine, astring_alloc());
+ ui_draw_text_full(astring_c(profilertext), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
+ astring_free(profilertext);
+ }
/* if we're single-stepping, pause now */
if (single_step)