mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Fixed issue with volume slider likely introduced with ui handler lambda changes
This commit is contained in:
parent
c2efdcd1a7
commit
e8782a7b06
@ -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());
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user