summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/devopt.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2022-06-16 12:47:52 +0200
committer Olivier Galibert <galibert@pobox.com>2025-04-29 23:06:41 +0200
commit45d4cd52a8194f2ef9e0383cfb2e2a35634af6ff (patch)
tree4e8d8fcb7382a5e9e0bce5ec59939bcfbe67155a /src/frontend/mame/ui/devopt.cpp
parent5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff)
full xtal conversionxtal
Diffstat (limited to 'src/frontend/mame/ui/devopt.cpp')
-rw-r--r--src/frontend/mame/ui/devopt.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp
index 1fc1e83564f..35d362aa354 100644
--- a/src/frontend/mame/ui/devopt.cpp
+++ b/src/frontend/mame/ui/devopt.cpp
@@ -50,7 +50,7 @@ void menu_device_config::populate_text(std::optional<text_layout> &layout, float
machine_config &mconfig(const_cast<machine_config &>(machine().config()));
machine_config::token const tok(mconfig.begin_configuration(mconfig.root_device()));
- device_t *const dev = mconfig.device_add(m_option->name(), m_option->devtype(), 0);
+ device_t *const dev = mconfig.device_add(m_option->name(), m_option->devtype());
for (device_t &d : device_enumerator(*dev))
if (!d.configured())
d.config_complete();
@@ -76,14 +76,14 @@ void menu_device_config::populate_text(std::optional<text_layout> &layout, float
continue;
// get cpu specific clock that takes internal multiplier/dividers into account
- u32 clock = exec.device().clock();
+ u32 clock = exec.device().clock().value();
// count how many identical CPUs we have
int count = 1;
const char *name = exec.device().name();
for (device_execute_interface &scan : execiter)
{
- if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock() == scan.device().clock())
+ if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock().value() == scan.device().clock().value())
if (exectags.insert(scan.device().tag()).second)
count++;
}
@@ -164,12 +164,12 @@ void menu_device_config::populate_text(std::optional<text_layout> &layout, float
int count = 1;
for (device_sound_interface &scan : snditer)
{
- if (sound.device().type() == scan.device().type() && sound.device().clock() == scan.device().clock())
+ if (sound.device().type() == scan.device().type() && sound.device().clock().value() == scan.device().clock().value())
if (soundtags.insert(scan.device().tag()).second)
count++;
}
- const u32 clock = sound.device().clock();
+ const u32 clock = sound.device().clock().value();
std::string hz(std::to_string(clock));
int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0;
if (d > 0)