summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/sliders.cpp
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-05-28 15:36:50 +0200
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-05-28 17:33:45 +0200
commit63132b3d01ee0ad797e797057687facf43f4f26d (patch)
treebd207a3454fe4f68ae9f3230a9fb57107d9a7c88 /src/frontend/mame/ui/sliders.cpp
parent68a9dc6857e4f33be844e53d58acb8d24adcc543 (diff)
More slider cleanup, nw
Diffstat (limited to 'src/frontend/mame/ui/sliders.cpp')
-rw-r--r--src/frontend/mame/ui/sliders.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index 920d2ede4b4..b94b8f00055 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -43,7 +43,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 curvalue = (*slider->update)(machine(), slider->arg, slider->id, nullptr, SLIDER_NOCHANGE);
+ INT32 curvalue = slider->update(machine(), slider->arg, slider->id, nullptr, SLIDER_NOCHANGE);
INT32 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);
@@ -105,7 +105,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(machine(), slider->arg, slider->id, nullptr, newvalue);
reset(reset_options::REMEMBER_REF);
}
}
@@ -147,7 +147,7 @@ void menu_sliders::populate()
if (item.type == menu_item_type::SLIDER)
{
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ INT32 curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
UINT32 flags = 0;
if (curval > slider->minval)
flags |= FLAG_LEFT_ARROW;
@@ -170,7 +170,7 @@ void menu_sliders::populate()
if (item.type == menu_item_type::SLIDER)
{
slider_state* slider = reinterpret_cast<slider_state *>(item.ref);
- INT32 curval = (*slider->update)(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
+ INT32 curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE);
UINT32 flags = 0;
if (curval > slider->minval)
flags |= FLAG_LEFT_ARROW;
@@ -205,7 +205,7 @@ void menu_sliders::custom_render(void *selectedref, float top, float bottom, flo
INT32 curval;
/* determine the current value and text */
- curval = (*curslider->update)(machine(), curslider->arg, curslider->id, &tempstring, SLIDER_NOCHANGE);
+ curval = curslider->update(machine(), curslider->arg, curslider->id, &tempstring, SLIDER_NOCHANGE);
/* compute the current and default percentages */
percentage = (float)(curval - curslider->minval) / (float)(curslider->maxval - curslider->minval);