summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/sliders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/sliders.cpp')
-rw-r--r--src/frontend/mame/ui/sliders.cpp13
1 files changed, 8 insertions, 5 deletions
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);