summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/inputpair.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/inputpair.cpp')
-rw-r--r--src/osd/modules/render/bgfx/inputpair.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/osd/modules/render/bgfx/inputpair.cpp b/src/osd/modules/render/bgfx/inputpair.cpp
index 09b77fc6891..9b430607cb8 100644
--- a/src/osd/modules/render/bgfx/inputpair.cpp
+++ b/src/osd/modules/render/bgfx/inputpair.cpp
@@ -72,11 +72,6 @@ void bgfx_input_pair::bind(bgfx_effect *effect, const int32_t screen) const
bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), chains().textures().handle(name));
}
-int32_t bgfx_input_pair::slider_changed(running_machine &machine, void *arg, int id, std::string *str, int32_t newval)
-{
- return texture_changed(id, str, newval);
-}
-
int32_t bgfx_input_pair::texture_changed(int32_t id, std::string *str, int32_t newval)
{
if (newval != SLIDER_NOCHANGE)
@@ -111,18 +106,16 @@ int32_t bgfx_input_pair::texture_changed(int32_t id, std::string *str, int32_t n
void bgfx_input_pair::create_selection_slider(uint32_t screen_index)
{
- m_slider_state = std::make_unique<slider_state>();
+ int32_t minval = 0;
+ int32_t defval = m_current_texture;
+ int32_t maxval = m_available_textures.size() - 1;
+ int32_t incval = 1;
- m_slider_state->minval = 0;
- m_slider_state->defval = m_current_texture;
- m_slider_state->maxval = m_available_textures.size() - 1;
- m_slider_state->incval = 1;
+ std::string description = "Window " + std::to_string(chains().window_index()) + ", Screen " + std::to_string(screen_index) + " " + m_selection + ":";
using namespace std::placeholders;
- m_slider_state->update = std::bind(&bgfx_input_pair::slider_changed, this, _1, _2, _3, _4, _5);
- m_slider_state->arg = this;
- m_slider_state->id = screen_index;
- m_slider_state->description = "Window " + std::to_string(chains().window_index()) + ", Screen " + std::to_string(screen_index) + " " + m_selection + ":";
+ m_slider_state = std::make_unique<slider_state>(std::move(description), minval, defval, maxval, incval,
+ std::bind(&bgfx_input_pair::texture_changed, this, screen_index, _1, _2));
ui::menu_item item;
item.text = m_slider_state->description;