summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-01-27 19:13:27 -0500
committer AJR <ajrhacker@users.noreply.github.com>2021-01-27 19:25:18 -0500
commit1ef9d6991b39bc03565278f35b4af97e44c7bcbf (patch)
treea2915371d4f4ad8534ee989e8aa8b53f5d4c5e82 /src/frontend/mame/ui
parentcdde43b7a70f8aa434a028840d661c532525b1f2 (diff)
ui: Clean up slider callbacks
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r--src/frontend/mame/ui/slider.h25
-rw-r--r--src/frontend/mame/ui/sliderchangednotifier.h27
-rw-r--r--src/frontend/mame/ui/sliders.cpp13
-rw-r--r--src/frontend/mame/ui/submenu.cpp6
-rw-r--r--src/frontend/mame/ui/submenu.h6
-rw-r--r--src/frontend/mame/ui/ui.cpp309
-rw-r--r--src/frontend/mame/ui/ui.h54
7 files changed, 154 insertions, 286 deletions
diff --git a/src/frontend/mame/ui/slider.h b/src/frontend/mame/ui/slider.h
index 56da6849e81..f39b3dde7ce 100644
--- a/src/frontend/mame/ui/slider.h
+++ b/src/frontend/mame/ui/slider.h
@@ -14,23 +14,30 @@
#pragma once
-#include "sliderchangednotifier.h"
-
#include <functional>
+#include <string>
#define SLIDER_NOCHANGE 0x12345678
-typedef std::function<std::int32_t (running_machine &, void *, int, std::string *, std::int32_t)> slider_update;
+typedef std::function<std::int32_t (std::string *, std::int32_t)> slider_update;
struct slider_state
{
+ slider_state(const std::string &title, std::int32_t min, std::int32_t def, std::int32_t max, std::int32_t inc, slider_update func)
+ : update(func), minval(min), defval(def), maxval(max), incval(inc), description(title)
+ {
+ }
+
+ slider_state(std::string &&title, std::int32_t min, std::int32_t def, std::int32_t max, std::int32_t inc, slider_update func)
+ : update(func), minval(min), defval(def), maxval(max), incval(inc), description(std::move(title))
+ {
+ }
+
slider_update update; // callback
- void * arg = nullptr; // argument
- std::int32_t minval = 0; // minimum value
- std::int32_t defval = 0; // default value
- std::int32_t maxval = 0; // maximum value
- std::int32_t incval = 0; // increment value
- int id = 0;
+ std::int32_t minval; // minimum value
+ std::int32_t defval; // default value
+ std::int32_t maxval; // maximum value
+ std::int32_t incval; // increment value
std::string description; // textual description
};
diff --git a/src/frontend/mame/ui/sliderchangednotifier.h b/src/frontend/mame/ui/sliderchangednotifier.h
deleted file mode 100644
index eedb39684f3..00000000000
--- a/src/frontend/mame/ui/sliderchangednotifier.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Ryan Holtz
-//======================================================================
-//
-// sliderchangednotifier.cpp - Interface for a slider-changed callback
-//
-//======================================================================
-
-#ifndef MAME_FRONTEND_MAME_UI_SLIDERCHANGEDNOTIFIER_H
-#define MAME_FRONTEND_MAME_UI_SLIDERCHANGEDNOTIFIER_H
-
-#pragma once
-
-#include <cstdint>
-#include <string>
-
-class running_machine;
-
-class slider_changed_notifier
-{
-public:
- virtual ~slider_changed_notifier() { }
-
- virtual std::int32_t slider_changed(running_machine &machine, void *arg, int id, std::string *str, std::int32_t newval) = 0;
-};
-
-#endif // MAME_FRONTEND_MAME_UI_SLIDERCHANGEDNOTIFIER_H
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index 935c4b50d5d..4dba8969a90 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -42,7 +42,7 @@ void menu_sliders::handle()
if (menu_event->itemref != nullptr && menu_event->type == menu_item_type::SLIDER)
{
const slider_state *slider = (const slider_state *)menu_event->itemref;
- int32_t curvalue = slider->update(machine(), slider->arg, slider->id, nullptr, SLIDER_NOCHANGE);
+ int32_t curvalue = slider->update(nullptr, SLIDER_NOCHANGE);
int32_t increment = 0;
bool alt_pressed = machine().input().code_pressed(KEYCODE_LALT) || machine().input().code_pressed(KEYCODE_RALT);
bool ctrl_pressed = machine().input().code_pressed(KEYCODE_LCONTROL) || machine().input().code_pressed(KEYCODE_RCONTROL);
@@ -104,7 +104,7 @@ void menu_sliders::handle()
newvalue = slider->maxval;
// update the slider and recompute the menu
- slider->update(machine(), slider->arg, slider->id, nullptr, newvalue);
+ slider->update(nullptr, newvalue);
reset(reset_options::REMEMBER_REF);
}
}
@@ -157,11 +157,14 @@ void menu_sliders::populate(float &customtop, float &custombottom)
{
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
bool display(true);
+#if 0
+ // FIXME: this test should be reimplemented in a dedicated menu
if (slider->id >= SLIDER_ID_ADJUSTER && slider->id <= SLIDER_ID_ADJUSTER_LAST)
display = reinterpret_cast<ioport_field *>(slider->arg)->enabled();
+#endif
if (display)
{
- int32_t curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ int32_t curval = slider->update(&tempstring, SLIDER_NOCHANGE);
uint32_t flags = 0;
if (curval > slider->minval)
flags |= FLAG_LEFT_ARROW;
@@ -185,7 +188,7 @@ void menu_sliders::populate(float &customtop, float &custombottom)
if (item.type == menu_item_type::SLIDER)
{
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- int32_t curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ int32_t curval = slider->update(&tempstring, SLIDER_NOCHANGE);
uint32_t flags = 0;
if (curval > slider->minval)
flags |= FLAG_LEFT_ARROW;
@@ -220,7 +223,7 @@ void menu_sliders::custom_render(void *selectedref, float top, float bottom, flo
int32_t curval;
// determine the current value and text
- curval = curslider->update(machine(), curslider->arg, curslider->id, &tempstring, SLIDER_NOCHANGE);
+ curval = curslider->update(&tempstring, SLIDER_NOCHANGE);
// compute the current and default percentages
percentage = (float)(curval - curslider->minval) / (float)(curslider->maxval - curslider->minval);
diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp
index c6e6cfbcd85..6d034841b51 100644
--- a/src/frontend/mame/ui/submenu.cpp
+++ b/src/frontend/mame/ui/submenu.cpp
@@ -14,6 +14,12 @@
#include "ui/utils.h"
#include "ui/menuitem.h"
+#if defined(UI_WINDOWS) && !defined(UI_SDL)
+#include "../osd/windows/winmain.h"
+#else
+#include "../osd/modules/lib/osdobj_common.h"
+#endif
+
#include <limits>
diff --git a/src/frontend/mame/ui/submenu.h b/src/frontend/mame/ui/submenu.h
index f17b6fe53ff..6823b533b55 100644
--- a/src/frontend/mame/ui/submenu.h
+++ b/src/frontend/mame/ui/submenu.h
@@ -15,12 +15,6 @@
#include "emuopts.h"
#include "ui/menu.h"
-#if defined(UI_WINDOWS) && !defined(UI_SDL)
-#include "../osd/windows/winmain.h"
-#else
-#include "../osd/modules/lib/osdobj_common.h"
-#endif
-
#include <string>
#include <vector>
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 37df0da6b1f..f13d8ea846b 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -1464,30 +1464,6 @@ std::vector<ui::menu_item>& mame_ui_manager::get_slider_list(void)
}
-//-------------------------------------------------
-// slider_alloc - allocate a new slider entry
-//-------------------------------------------------
-
-std::unique_ptr<slider_state> mame_ui_manager::slider_alloc(int id, const char *title, int32_t minval, int32_t defval, int32_t maxval, int32_t incval, void *arg)
-{
- auto state = std::make_unique<slider_state>();
-
- state->minval = minval;
- state->defval = defval;
- state->maxval = maxval;
- state->incval = incval;
-
- using namespace std::placeholders;
- state->update = std::bind(&mame_ui_manager::slider_changed, this, _1, _2, _3, _4, _5);
-
- state->arg = arg;
- state->id = id;
- state->description = title;
-
- return state;
-}
-
-
//----------------------------------------------------------
// mame_ui_manager::slider_init - initialize the list of slider
// controls
@@ -1495,10 +1471,12 @@ std::unique_ptr<slider_state> mame_ui_manager::slider_alloc(int id, const char *
std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine)
{
+ using namespace std::placeholders;
+
m_sliders.clear();
// add overall volume
- m_sliders.push_back(slider_alloc(SLIDER_ID_VOLUME, _("Master Volume"), -32, 0, 0, 1, nullptr));
+ slider_alloc(_("Master Volume"), -32, 0, 0, 1, std::bind(&mame_ui_manager::slider_volume, this, _1, _2));
// add per-channel volume
mixer_input info;
@@ -1508,84 +1486,77 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine
int32_t defval = 1000;
std::string str = string_format(_("%1$s Volume"), info.stream->input(info.inputnum).name());
- m_sliders.push_back(slider_alloc(SLIDER_ID_MIXERVOL + item, str.c_str(), 0, defval, maxval, 20, (void *)(uintptr_t)item));
+ slider_alloc(std::move(str), 0, defval, maxval, 20, std::bind(&mame_ui_manager::slider_mixervol, this, item, _1, _2));
}
// add analog adjusters
- int slider_index = 0;
for (auto &port : machine.ioport().ports())
{
for (ioport_field &field : port.second->fields())
{
if (field.type() == IPT_ADJUSTER)
{
- m_sliders.push_back(slider_alloc(SLIDER_ID_ADJUSTER + slider_index++, field.name(), field.minval(), field.defvalue(), field.maxval(), 1, (void *)&field));
+ slider_alloc(field.name(), field.minval(), field.defvalue(), field.maxval(), 1,
+ std::bind(&mame_ui_manager::slider_adjuster, this, std::ref(field), _1, _2));
}
}
}
// add CPU overclocking (cheat only)
- slider_index = 0;
if (machine.options().cheat())
{
for (device_execute_interface &exec : execute_interface_enumerator(machine.root_device()))
{
- void *param = (void *)&exec.device();
std::string str = string_format(_("Overclock CPU %1$s"), exec.device().tag());
- m_sliders.push_back(slider_alloc(SLIDER_ID_OVERCLOCK + slider_index++, str.c_str(), 100, 1000, 4000, 10, param));
+ slider_alloc(std::move(str), 100, 1000, 4000, 10, std::bind(&mame_ui_manager::slider_overclock, this, std::ref(exec.device()), _1, _2));
}
for (device_sound_interface &snd : sound_interface_enumerator(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());
- m_sliders.push_back(slider_alloc(SLIDER_ID_OVERCLOCK + slider_index++, str.c_str(), 100, 1000, 4000, 10, param));
+ slider_alloc(std::move(str), 100, 1000, 4000, 10, std::bind(&mame_ui_manager::slider_overclock, this, std::ref(snd.device()), _1, _2));
}
}
}
// add screen parameters
screen_device_enumerator scriter(machine.root_device());
- slider_index = 0;
for (screen_device &screen : scriter)
{
int defxscale = floor(screen.xscale() * 1000.0f + 0.5f);
int defyscale = floor(screen.yscale() * 1000.0f + 0.5f);
int defxoffset = floor(screen.xoffset() * 1000.0f + 0.5f);
int defyoffset = floor(screen.yoffset() * 1000.0f + 0.5f);
- void *param = (void *)&screen;
std::string screen_desc = machine_info().get_screen_desc(screen);
// add refresh rate tweaker
if (machine.options().cheat())
{
std::string str = string_format(_("%1$s Refresh Rate"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_REFRESH + slider_index, str.c_str(), -10000, 0, 10000, 1000, param));
+ slider_alloc(std::move(str), -10000, 0, 10000, 1000, std::bind(&mame_ui_manager::slider_refresh, this, std::ref(screen), _1, _2));
}
// add standard brightness/contrast/gamma controls per-screen
std::string str = string_format(_("%1$s Brightness"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_BRIGHTNESS + slider_index, str.c_str(), 100, 1000, 2000, 10, param));
+ slider_alloc(std::move(str), 100, 1000, 2000, 10, std::bind(&mame_ui_manager::slider_brightness, this, std::ref(screen), _1, _2));
str = string_format(_("%1$s Contrast"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_CONTRAST + slider_index, str.c_str(), 100, 1000, 2000, 50, param));
+ slider_alloc(std::move(str), 100, 1000, 2000, 50, std::bind(&mame_ui_manager::slider_contrast, this, std::ref(screen), _1, _2));
str = string_format(_("%1$s Gamma"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_GAMMA + slider_index, str.c_str(), 100, 1000, 3000, 50, param));
+ slider_alloc(std::move(str), 100, 1000, 3000, 50, std::bind(&mame_ui_manager::slider_gamma, this, std::ref(screen), _1, _2));
// add scale and offset controls per-screen
str = string_format(_("%1$s Horiz Stretch"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_XSCALE + slider_index, str.c_str(), 500, defxscale, 1500, 2, param));
+ slider_alloc(std::move(str), 500, defxscale, 1500, 2, std::bind(&mame_ui_manager::slider_xscale, this, std::ref(screen), _1, _2));
str = string_format(_("%1$s Horiz Position"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_XOFFSET + slider_index, str.c_str(), -500, defxoffset, 500, 2, param));
+ slider_alloc(std::move(str), -500, defxoffset, 500, 2, std::bind(&mame_ui_manager::slider_xoffset, this, std::ref(screen), _1, _2));
str = string_format(_("%1$s Vert Stretch"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_YSCALE + slider_index, str.c_str(), 500, defyscale, 1500, 2, param));
+ slider_alloc(std::move(str), 500, defyscale, 1500, 2, std::bind(&mame_ui_manager::slider_yscale, this, std::ref(screen), _1, _2));
str = string_format(_("%1$s Vert Position"), screen_desc);
- m_sliders.push_back(slider_alloc(SLIDER_ID_YOFFSET + slider_index, str.c_str(), -500, defyoffset, 500, 2, param));
- slider_index++;
+ slider_alloc(std::move(str), -500, defyoffset, 500, 2, std::bind(&mame_ui_manager::slider_yoffset, this, std::ref(screen), _1, _2));
}
- slider_index = 0;
for (laserdisc_device &laserdisc : laserdisc_device_enumerator(machine.root_device()))
{
if (laserdisc.overlay_configured())
@@ -1596,39 +1567,36 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine
int defyscale = floor(config.m_overscaley * 1000.0f + 0.5f);
int defxoffset = floor(config.m_overposx * 1000.0f + 0.5f);
int defyoffset = floor(config.m_overposy * 1000.0f + 0.5f);
- void *param = (void *)&laserdisc;
// add scale and offset controls per-overlay
std::string str = string_format(_("Laserdisc '%1$s' Horiz Stretch"), laserdisc.tag());
- m_sliders.push_back(slider_alloc(SLIDER_ID_OVERLAY_XSCALE + slider_index, str.c_str(), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, param));
+ slider_alloc(std::move(str), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2,
+ std::bind(&mame_ui_manager::slider_overxscale, this, std::ref(laserdisc), _1, _2));
str = string_format(_("Laserdisc '%1$s' Horiz Position"), laserdisc.tag());
- m_sliders.push_back(slider_alloc(SLIDER_ID_OVERLAY_YSCALE + slider_index, str.c_str(), -500, defxoffset, 500, 2, param));
+ slider_alloc(std::move(str), -500, defxoffset, 500, 2, std::bind(&mame_ui_manager::slider_overxoffset, this, std::ref(laserdisc), _1, _2));
str = string_format(_("Laserdisc '%1$s' Vert Stretch"), laserdisc.tag());
- m_sliders.push_back(slider_alloc(SLIDER_ID_OVERLAY_XOFFSET + slider_index, str.c_str(), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, param));
+ slider_alloc(std::move(str), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2,
+ std::bind(&mame_ui_manager::slider_overyscale, this, std::ref(laserdisc), _1, _2));
str = string_format(_("Laserdisc '%1$s' Vert Position"), laserdisc.tag());
- m_sliders.push_back(slider_alloc(SLIDER_ID_OVERLAY_YOFFSET + slider_index, str.c_str(), -500, defyoffset, 500, 2, param));
- slider_index++;
+ slider_alloc(std::move(str), -500, defyoffset, 500, 2, std::bind(&mame_ui_manager::slider_overyoffset, this, std::ref(laserdisc), _1, _2));
}
}
- slider_index = 0;
for (screen_device &screen : scriter)
{
if (screen.screen_type() == SCREEN_TYPE_VECTOR)
{
- // add vector control
- m_sliders.push_back(slider_alloc(SLIDER_ID_FLICKER + slider_index, _("Vector Flicker"), 0, 0, 1000, 10, nullptr));
- m_sliders.push_back(slider_alloc(SLIDER_ID_BEAM_WIDTH_MIN + slider_index, _("Beam Width Minimum"), 100, 100, 1000, 1, nullptr));
- m_sliders.push_back(slider_alloc(SLIDER_ID_BEAM_WIDTH_MAX + slider_index, _("Beam Width Maximum"), 100, 100, 1000, 1, nullptr));
- m_sliders.push_back(slider_alloc(SLIDER_ID_BEAM_DOT_SIZE + slider_index, _("Beam Dot Size"), 100, 100, 1000, 1, nullptr));
- m_sliders.push_back(slider_alloc(SLIDER_ID_BEAM_INTENSITY + slider_index, _("Beam Intensity Weight"), -1000, 0, 1000, 10, nullptr));
- slider_index++;
+ // add vector control (FIXME: these should all be per-screen rather than global)
+ slider_alloc(_("Vector Flicker"), 0, 0, 1000, 10, std::bind(&mame_ui_manager::slider_flicker, this, std::ref(screen), _1, _2));
+ slider_alloc(_("Beam Width Minimum"), 100, 100, 1000, 1, std::bind(&mame_ui_manager::slider_beam_width_min, this, std::ref(screen), _1, _2));
+ slider_alloc(_("Beam Width Maximum"), 100, 100, 1000, 1, std::bind(&mame_ui_manager::slider_beam_width_max, this, std::ref(screen), _1, _2));
+ slider_alloc(_("Beam Dot Size"), 100, 100, 1000, 1, std::bind(&mame_ui_manager::slider_beam_dot_size, this, std::ref(screen), _1, _2));
+ slider_alloc(_("Beam Intensity Weight"), -1000, 0, 1000, 10, std::bind(&mame_ui_manager::slider_beam_intensity_weight, this, std::ref(screen), _1, _2));
break;
}
}
#ifdef MAME_DEBUG
- slider_index = 0;
// add crosshair adjusters
for (auto &port : machine.ioport().ports())
{
@@ -1637,9 +1605,9 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine
if (field.crosshair_axis() != CROSSHAIR_AXIS_NONE && field.player() == 0)
{
std::string str = string_format(_("Crosshair Scale %1$s"), (field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("X") : _("Y"));
- m_sliders.push_back(slider_alloc(SLIDER_ID_CROSSHAIR_SCALE + slider_index, str.c_str(), -3000, 1000, 3000, 100, (void *)&field));
+ slider_alloc(std::move(str), -3000, 1000, 3000, 100, std::bind(&mame_ui_manager::slider_crossscale, this, std::ref(field), _1, _2));
str = string_format(_("Crosshair Offset %1$s"), (field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("X") : _("Y"));
- m_sliders.push_back(slider_alloc(SLIDER_ID_CROSSHAIR_OFFSET + slider_index, str.c_str(), -3000, 0, 3000, 100, (void *)&field));
+ slider_alloc(std::move(str), -3000, 0, 3000, 100, std::bind(&mame_ui_manager::slider_crossoffset, this, std::ref(field), _1, _2));
}
}
}
@@ -1660,76 +1628,18 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine
return items;
}
-//----------------------------------------------------
-// slider_changed - global slider-modified callback
-//----------------------------------------------------
-
-int32_t mame_ui_manager::slider_changed(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
-{
- if (id == SLIDER_ID_VOLUME)
- return slider_volume(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_MIXERVOL && id <= SLIDER_ID_MIXERVOL_LAST)
- return slider_mixervol(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_ADJUSTER && id <= SLIDER_ID_ADJUSTER_LAST)
- return slider_adjuster(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_OVERCLOCK && id <= SLIDER_ID_OVERCLOCK_LAST)
- return slider_overclock(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_REFRESH && id <= SLIDER_ID_REFRESH_LAST)
- return slider_refresh(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_BRIGHTNESS && id <= SLIDER_ID_BRIGHTNESS_LAST)
- return slider_brightness(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_CONTRAST && id <= SLIDER_ID_CONTRAST_LAST)
- return slider_contrast(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_GAMMA && id <= SLIDER_ID_GAMMA_LAST)
- return slider_gamma(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_XSCALE && id <= SLIDER_ID_XSCALE_LAST)
- return slider_xscale(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_YSCALE && id <= SLIDER_ID_YSCALE_LAST)
- return slider_yscale(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_XOFFSET && id <= SLIDER_ID_XOFFSET_LAST)
- return slider_xoffset(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_YOFFSET && id <= SLIDER_ID_YOFFSET_LAST)
- return slider_yoffset(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_OVERLAY_XSCALE && id <= SLIDER_ID_OVERLAY_XSCALE_LAST)
- return slider_overxscale(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_OVERLAY_YSCALE && id <= SLIDER_ID_OVERLAY_YSCALE_LAST)
- return slider_overyscale(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_OVERLAY_XOFFSET && id <= SLIDER_ID_OVERLAY_XOFFSET_LAST)
- return slider_overxoffset(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_OVERLAY_YOFFSET && id <= SLIDER_ID_OVERLAY_YOFFSET_LAST)
- return slider_overyoffset(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_FLICKER && id <= SLIDER_ID_FLICKER_LAST)
- return slider_flicker(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_BEAM_WIDTH_MIN && id <= SLIDER_ID_BEAM_WIDTH_MIN_LAST)
- return slider_beam_width_min(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_BEAM_WIDTH_MAX && id <= SLIDER_ID_BEAM_WIDTH_MAX_LAST)
- return slider_beam_width_max(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_BEAM_DOT_SIZE && id <= SLIDER_ID_BEAM_DOT_SIZE_LAST)
- return slider_beam_dot_size(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_BEAM_INTENSITY && id <= SLIDER_ID_BEAM_INTENSITY_LAST)
- return slider_beam_intensity_weight(machine, arg, id, str, newval);
-#ifdef MAME_DEBUG
- else if (id >= SLIDER_ID_CROSSHAIR_SCALE && id <= SLIDER_ID_CROSSHAIR_SCALE_LAST)
- return slider_crossscale(machine, arg, id, str, newval);
- else if (id >= SLIDER_ID_CROSSHAIR_OFFSET && id <= SLIDER_ID_CROSSHAIR_OFFSET_LAST)
- return slider_crossoffset(machine, arg, id, str, newval);
-#endif
-
- return 0;
-}
-
//-------------------------------------------------
// slider_volume - global volume slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_volume(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_volume(std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
- machine.sound().set_attenuation(newval);
+ machine().sound().set_attenuation(newval);
if (str)
- *str = string_format(_("%1$3ddB"), machine.sound().attenuation());
- return machine.sound().attenuation();
+ *str = string_format(_("%1$3ddB"), machine().sound().attenuation());
+ return machine().sound().attenuation();
}
@@ -1738,10 +1648,10 @@ int32_t mame_ui_manager::slider_volume(running_machine &machine, void *arg, int
// slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_mixervol(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_mixervol(int item, std::string *str, int32_t newval)
{
mixer_input info;
- if (!machine.sound().indexed_mixer_input((uintptr_t)arg, info))
+ if (!machine().sound().indexed_mixer_input(item, info))
return 0;
if (newval != SLIDER_NOCHANGE)
{
@@ -1760,16 +1670,15 @@ int32_t mame_ui_manager::slider_mixervol(running_machine &machine, void *arg, in
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_adjuster(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_adjuster(ioport_field &field, std::string *str, int32_t newval)
{
- ioport_field *field = (ioport_field *)arg;
ioport_field::user_settings settings;
- field->get_user_settings(settings);
+ field.get_user_settings(settings);
if (newval != SLIDER_NOCHANGE)
{
settings.value = newval;
- field->set_user_settings(settings);
+ field.set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$d%%"), settings.value);
@@ -1782,14 +1691,13 @@ int32_t mame_ui_manager::slider_adjuster(running_machine &machine, void *arg, in
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_overclock(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_overclock(device_t &device, std::string *str, int32_t newval)
{
- device_t *cpu = (device_t *)arg;
if (newval != SLIDER_NOCHANGE)
- cpu->set_clock_scale((float)newval * 0.001f);
+ device.set_clock_scale((float)newval * 0.001f);
if (str)
- *str = string_format(_("%1$3.0f%%"), floor(cpu->clock_scale() * 100.0 + 0.5));
- return floor(cpu->clock_scale() * 1000.0 + 0.5);
+ *str = string_format(_("%1$3.0f%%"), floor(device.clock_scale() * 100.0 + 0.5));
+ return floor(device.clock_scale() * 1000.0 + 0.5);
}
@@ -1797,23 +1705,22 @@ int32_t mame_ui_manager::slider_overclock(running_machine &machine, void *arg, i
// slider_refresh - refresh rate slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_refresh(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_refresh(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
- double defrefresh = ATTOSECONDS_TO_HZ(screen->refresh_attoseconds());
+ double defrefresh = ATTOSECONDS_TO_HZ(screen.refresh_attoseconds());
double refresh;
if (newval != SLIDER_NOCHANGE)
{
- int width = screen->width();
- int height = screen->height();
- const rectangle &visarea = screen->visible_area();
- screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001));
+ int width = screen.width();
+ int height = screen.height();
+ const rectangle &visarea = screen.visible_area();
+ screen.configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001));
}
if (str)
- *str = string_format(_("%1$.3f" UTF8_NBSP "Hz"), screen->frame_period().as_hz());
- refresh = screen->frame_period().as_hz();
+ *str = string_format(_("%1$.3f" UTF8_NBSP "Hz"), screen.frame_period().as_hz());
+ refresh = screen.frame_period().as_hz();
return floor((refresh - defrefresh) * 1000.0 + 0.5);
}
@@ -1823,15 +1730,13 @@ int32_t mame_ui_manager::slider_refresh(running_machine &machine, void *arg, int
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_brightness(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_brightness(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_brightness = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_brightness);
@@ -1844,15 +1749,13 @@ int32_t mame_ui_manager::slider_brightness(running_machine &machine, void *arg,
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_contrast(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_contrast(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_contrast = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_contrast);
@@ -1864,15 +1767,13 @@ int32_t mame_ui_manager::slider_contrast(running_machine &machine, void *arg, in
// slider_gamma - screen gamma slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_gamma(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_gamma(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_gamma = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_gamma);
@@ -1885,15 +1786,13 @@ int32_t mame_ui_manager::slider_gamma(running_machine &machine, void *arg, int i
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_xscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_xscale(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_xscale = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_xscale);
@@ -1906,15 +1805,13 @@ int32_t mame_ui_manager::slider_xscale(running_machine &machine, void *arg, int
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_yscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_yscale(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_yscale = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_yscale);
@@ -1927,15 +1824,13 @@ int32_t mame_ui_manager::slider_yscale(running_machine &machine, void *arg, int
// slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_xoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_xoffset(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_xoffset = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_xoffset);
@@ -1948,15 +1843,13 @@ int32_t mame_ui_manager::slider_xoffset(running_machine &machine, void *arg, int
// slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_yoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_yoffset(screen_device &screen, std::string *str, int32_t newval)
{
- screen_device *screen = reinterpret_cast<screen_device *>(arg);
-
- render_container::user_settings settings = screen->container().get_user_settings();
+ render_container::user_settings settings = screen.container().get_user_settings();
if (newval != SLIDER_NOCHANGE)
{
settings.m_yoffset = (float)newval * 0.001f;
- screen->container().set_user_settings(settings);
+ screen.container().set_user_settings(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_yoffset);
@@ -1969,16 +1862,15 @@ int32_t mame_ui_manager::slider_yoffset(running_machine &machine, void *arg, int
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_overxscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_overxscale(laserdisc_device &laserdisc, std::string *str, int32_t newval)
{
- laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
- laserdisc->get_overlay_config(settings);
+ laserdisc.get_overlay_config(settings);
if (newval != SLIDER_NOCHANGE)
{
settings.m_overscalex = (float)newval * 0.001f;
- laserdisc->set_overlay_config(settings);
+ laserdisc.set_overlay_config(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_overscalex);
@@ -1991,16 +1883,15 @@ int32_t mame_ui_manager::slider_overxscale(running_machine &machine, void *arg,
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_overyscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_overyscale(laserdisc_device &laserdisc, std::string *str, int32_t newval)
{
- laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
- laserdisc->get_overlay_config(settings);
+ laserdisc.get_overlay_config(settings);
if (newval != SLIDER_NOCHANGE)
{
settings.m_overscaley = (float)newval * 0.001f;
- laserdisc->set_overlay_config(settings);
+ laserdisc.set_overlay_config(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_overscaley);
@@ -2013,16 +1904,15 @@ int32_t mame_ui_manager::slider_overyscale(running_machine &machine, void *arg,
// slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_overxoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_overxoffset(laserdisc_device &laserdisc, std::string *str, int32_t newval)
{
- laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
- laserdisc->get_overlay_config(settings);
+ laserdisc.get_overlay_config(settings);
if (newval != SLIDER_NOCHANGE)
{
settings.m_overposx = (float)newval * 0.001f;
- laserdisc->set_overlay_config(settings);
+ laserdisc.set_overlay_config(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_overposx);
@@ -2035,16 +1925,15 @@ int32_t mame_ui_manager::slider_overxoffset(running_machine &machine, void *arg,
// slider callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_overyoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_overyoffset(laserdisc_device &laserdisc, std::string *str, int32_t newval)
{
- laserdisc_device *laserdisc = (laserdisc_device *)arg;
laserdisc_overlay_config settings;
- laserdisc->get_overlay_config(settings);
+ laserdisc.get_overlay_config(settings);
if (newval != SLIDER_NOCHANGE)
{
settings.m_overposy = (float)newval * 0.001f;
- laserdisc->set_overlay_config(settings);
+ laserdisc.set_overlay_config(settings);
}
if (str)
*str = string_format(_("%1$.3f"), settings.m_overposy);
@@ -2057,7 +1946,7 @@ int32_t mame_ui_manager::slider_overyoffset(running_machine &machine, void *arg,
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_flicker(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_flicker([[maybe_unused]] screen_device &screen, std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
vector_options::s_flicker = (float)newval * 0.001f;
@@ -2072,7 +1961,7 @@ int32_t mame_ui_manager::slider_flicker(running_machine &machine, void *arg, int
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_beam_width_min(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_beam_width_min([[maybe_unused]] screen_device &screen, std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
vector_options::s_beam_width_min = std::min((float)newval * 0.01f, vector_options::s_beam_width_max);
@@ -2087,7 +1976,7 @@ int32_t mame_ui_manager::slider_beam_width_min(running_machine &machine, void *a
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_beam_width_max(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_beam_width_max([[maybe_unused]] screen_device &screen, std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
vector_options::s_beam_width_max = std::max((float)newval * 0.01f, vector_options::s_beam_width_min);
@@ -2102,7 +1991,7 @@ int32_t mame_ui_manager::slider_beam_width_max(running_machine &machine, void *a
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_beam_dot_size(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_beam_dot_size([[maybe_unused]] screen_device &screen, std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
vector_options::s_beam_dot_size = std::max((float)newval * 0.01f, 0.1f);
@@ -2117,7 +2006,7 @@ int32_t mame_ui_manager::slider_beam_dot_size(running_machine &machine, void *ar
// callback
//-------------------------------------------------
-int32_t mame_ui_manager::slider_beam_intensity_weight(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_beam_intensity_weight([[maybe_unused]] screen_device &screen, std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
vector_options::s_beam_intensity_weight = (float)newval * 0.001f;
@@ -2133,15 +2022,13 @@ int32_t mame_ui_manager::slider_beam_intensity_weight(running_machine &machine,
//-------------------------------------------------
#ifdef MAME_DEBUG
-int32_t mame_ui_manager::slider_crossscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_crossscale(ioport_field &field, std::string *str, int32_t newval)
{
- ioport_field *field = (ioport_field *)arg;
-
if (newval != SLIDER_NOCHANGE)
- field->set_crosshair_scale(float(newval) * 0.001);
+ field.set_crosshair_scale(float(newval) * 0.001);
if (str)
- *str = string_format((field->crosshair_axis() == CROSSHAIR_AXIS_X) ? _("Crosshair Scale X %1$1.3f") : _("Crosshair Scale Y %1$1.3f"), float(newval) * 0.001f);
- return floor(field->crosshair_scale() * 1000.0f + 0.5f);
+ *str = string_format((field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("Crosshair Scale X %1$1.3f") : _("Crosshair Scale Y %1$1.3f"), float(newval) * 0.001f);
+ return floor(field.crosshair_scale() * 1000.0f + 0.5f);
}
#endif
@@ -2152,15 +2039,13 @@ int32_t mame_ui_manager::slider_crossscale(running_machine &machine, void *arg,
//-------------------------------------------------
#ifdef MAME_DEBUG
-int32_t mame_ui_manager::slider_crossoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
+int32_t mame_ui_manager::slider_crossoffset(ioport_field &field, std::string *str, int32_t newval)
{
- ioport_field *field = (ioport_field *)arg;
-
if (newval != SLIDER_NOCHANGE)
- field->set_crosshair_offset(float(newval) * 0.001f);
+ field.set_crosshair_offset(float(newval) * 0.001f);
if (str)
- *str = string_format((field->crosshair_axis() == CROSSHAIR_AXIS_X) ? _("Crosshair Offset X %1$1.3f") : _("Crosshair Offset Y %1$1.3f"), float(newval) * 0.001f);
- return field->crosshair_offset();
+ *str = string_format((field.crosshair_axis() == CROSSHAIR_AXIS_X) ? _("Crosshair Offset X %1$1.3f") : _("Crosshair Offset Y %1$1.3f"), float(newval) * 0.001f);
+ return field.crosshair_offset();
}
#endif
diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h
index 932957d9f9d..5afd5abe119 100644
--- a/src/frontend/mame/ui/ui.h
+++ b/src/frontend/mame/ui/ui.h
@@ -36,6 +36,8 @@ class machine_info;
} // namespace ui
+class laserdisc_device;
+
/***************************************************************************
CONSTANTS
@@ -170,7 +172,7 @@ private:
// ======================> mame_ui_manager
-class mame_ui_manager : public ui_manager, public slider_changed_notifier
+class mame_ui_manager : public ui_manager
{
public:
enum draw_mode
@@ -312,36 +314,34 @@ private:
void exit();
void config_load(config_type cfg_type, util::xml::data_node const *parentnode);
void config_save(config_type cfg_type, util::xml::data_node *parentnode);
- std::unique_ptr<slider_state> slider_alloc(int id, const char *title, int32_t minval, int32_t defval, int32_t maxval, int32_t incval, void *arg);
+ template <typename... Params> void slider_alloc(Params &&...args) { m_sliders.push_back(std::make_unique<slider_state>(std::forward<Params>(args)...)); }
// slider controls
- virtual int32_t slider_changed(running_machine &machine, void *arg, int id, std::string *str, int32_t newval) override;
-
- int32_t slider_volume(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_mixervol(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_adjuster(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_overclock(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_refresh(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_brightness(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_contrast(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_gamma(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_xscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_yscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_xoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_yoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_overxscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_overyscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_overxoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_overyoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_flicker(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_beam_width_min(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_beam_width_max(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_beam_dot_size(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_beam_intensity_weight(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
+ int32_t slider_volume(std::string *str, int32_t newval);
+ int32_t slider_mixervol(int item, std::string *str, int32_t newval);
+ int32_t slider_adjuster(ioport_field &field, std::string *str, int32_t newval);
+ int32_t slider_overclock(device_t &device, std::string *str, int32_t newval);
+ int32_t slider_refresh(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_brightness(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_contrast(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_gamma(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_xscale(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_yscale(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_xoffset(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_yoffset(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_overxscale(laserdisc_device &laserdisc, std::string *str, int32_t newval);
+ int32_t slider_overyscale(laserdisc_device &laserdisc, std::string *str, int32_t newval);
+ int32_t slider_overxoffset(laserdisc_device &laserdisc, std::string *str, int32_t newval);
+ int32_t slider_overyoffset(laserdisc_device &laserdisc, std::string *str, int32_t newval);
+ int32_t slider_flicker(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_beam_width_min(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_beam_width_max(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_beam_dot_size(screen_device &screen, std::string *str, int32_t newval);
+ int32_t slider_beam_intensity_weight(screen_device &screen, std::string *str, int32_t newval);
std::string slider_get_screen_desc(screen_device &screen);
#ifdef MAME_DEBUG
- int32_t slider_crossscale(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
- int32_t slider_crossoffset(running_machine &machine, void *arg, int id, std::string *str, int32_t newval);
+ int32_t slider_crossscale(ioport_field &field, std::string *str, int32_t newval);
+ int32_t slider_crossoffset(ioport_field &field, std::string *str, int32_t newval);
#endif
std::vector<std::unique_ptr<slider_state>> m_sliders;