diff options
author | 2009-10-25 05:04:51 +0000 | |
---|---|---|
committer | 2009-10-25 05:04:51 +0000 | |
commit | 731077c991f07646c0a32535f70f26b9f54c53ce (patch) | |
tree | ee7e8eda393a01048c1d89a1481f931d5b50e077 /src/emu/ui.c | |
parent | 69c49ae7cbfe8416a75300721456ec11fb5eccd1 (diff) |
From: Dirk Best <startaq@gmail.com>
Date: Sat, Oct 10, 2009 at 20:09
Subject: patch for ui.c
To: submit@mamedev.org
Hello,
attached is a small patch that changes the way cpu clocks are
displayed on the initial information page. It now displays the real
values, which takes internal mulitpliers/dividers into account.
Dirk
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index 8bd2762cdb7..0b402f76ab3 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -979,6 +979,9 @@ astring *game_info_astring(running_machine *machine, astring *string) /* loop over all CPUs */ for (device = machine->firstcpu; device != NULL; device = scandevice) { + /* get cpu specific clock that takes internal multiplier/dividers into account */ + int clock = cpu_get_clock(device); + /* count how many identical CPUs we have */ count = 1; for (scandevice = device->typenext; scandevice != NULL; scandevice = scandevice->typenext) @@ -994,10 +997,10 @@ astring *game_info_astring(running_machine *machine, astring *string) astring_catc(string, cpu_get_name(device)); /* display clock in kHz or MHz */ - if (device->clock >= 1000000) - astring_catprintf(string, " %d.%06d" UTF8_NBSP "MHz\n", device->clock / 1000000, device->clock % 1000000); + if (clock >= 1000000) + astring_catprintf(string, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); else - astring_catprintf(string, " %d.%03d" UTF8_NBSP "kHz\n", device->clock / 1000, device->clock % 1000); + astring_catprintf(string, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); } /* loop over all sound chips */ |