Fixed issue with volume slider likely introduced with ui handler lambda changes

This commit is contained in:
Nathan Woods 2016-06-06 21:32:04 -04:00
parent c2efdcd1a7
commit e8782a7b06
3 changed files with 7 additions and 7 deletions

View File

@ -264,18 +264,18 @@ void menu_sliders::custom_render(void *selectedref, float top, float bottom, flo
standard menu handler
-------------------------------------------------*/
UINT32 menu_sliders::ui_handler(render_container *container, mame_ui_manager &mui, bool state)
UINT32 menu_sliders::ui_handler(render_container *container, mame_ui_manager &mui)
{
UINT32 result;
/* if this is the first call, push the sliders menu */
if (state)
// if this is the first call, push the sliders menu
if (topmost_menu<menu_sliders>() == nullptr)
menu::stack_push<menu_sliders>(mui, container, true);
/* handle standard menus */
// handle standard menus
result = menu::ui_handler(container, mui);
/* if we are cancelled, pop the sliders menu */
// if we are cancelled, pop the sliders menu
if (result == UI_HANDLER_CANCEL)
menu::stack_pop(mui.machine());

View File

@ -27,7 +27,7 @@ public:
virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
static UINT32 ui_handler(render_container *container, mame_ui_manager &mui, bool state);
static UINT32 ui_handler(render_container *container, mame_ui_manager &mui);
private:
enum {

View File

@ -1572,7 +1572,7 @@ UINT32 mame_ui_manager::handler_ingame(render_container *container)
// if the on-screen display isn't up and the user has toggled it, turn it on
if ((machine().debug_flags & DEBUG_FLAG_ENABLED) == 0 && machine().ui_input().pressed(IPT_UI_ON_SCREEN_DISPLAY))
{
set_handler<mame_ui_manager&, bool>(UI_CALLBACK_TYPE_GENERAL, ui::menu_sliders::ui_handler, *this, true);
set_handler<mame_ui_manager&>(UI_CALLBACK_TYPE_MENU, ui::menu_sliders::ui_handler, *this);
return 1;
}