summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-06-26 08:42:04 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-06-26 08:44:47 -0400
commit44c3a6b25b4079f69402af5b51c72c65237c1d9e (patch)
treeaa85e8a259a1253d7e49a99a10bfcdfcbeb55d5c
parent6f6ba05f6c5701308cb7adc693e207f3c25f3c01 (diff)
Allow experimental overclocking of sound devices through UI sliders with -cheat enabled
-rw-r--r--src/frontend/mame/ui/ui.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index f669321092f..c6f552e87e2 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -1402,6 +1402,16 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine
std::string str = string_format(_("Overclock CPU %1$s"), exec.device().tag());
sliders.push_back(slider_alloc(machine, SLIDER_ID_OVERCLOCK + slider_index++, str.c_str(), 10, 1000, 2000, 1, param));
}
+ for (device_sound_interface &snd : sound_interface_iterator(machine.root_device()))
+ {
+ device_execute_interface *exec;
+ if (!snd.device().interface(exec) && snd.device().unscaled_clock() != 0)
+ {
+ void *param = (void *)&snd.device();
+ std::string str = string_format(_("Overclock %1$s sound"), snd.device().tag());
+ sliders.push_back(slider_alloc(machine, SLIDER_ID_OVERCLOCK + slider_index++, str.c_str(), 10, 1000, 2000, 1, param));
+ }
+ }
}
// add screen parameters