summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/inputmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/inputmap.cpp')
-rw-r--r--src/frontend/mame/ui/inputmap.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/inputmap.cpp b/src/frontend/mame/ui/inputmap.cpp
index 4fa6ffab25b..b5b56b6e1fb 100644
--- a/src/frontend/mame/ui/inputmap.cpp
+++ b/src/frontend/mame/ui/inputmap.cpp
@@ -46,9 +46,8 @@ void menu_input_groups::populate()
item_append(menu_item_type::SEPARATOR);
}
-void menu_input_groups::handle(event const *ev)
+bool menu_input_groups::handle(event const *ev)
{
- // process the menu
if (ev && (ev->iptkey == IPT_UI_SELECT))
{
menu::stack_push<menu_input_general>(
@@ -57,6 +56,8 @@ void menu_input_groups::handle(event const *ev)
int(uintptr_t(ev->itemref) - 1),
util::string_format(_("Input Assignments (%1$s)"), ev->item->text()));
}
+
+ return false;
}
@@ -377,10 +378,11 @@ void menu_input::custom_render(void *selectedref, float top, float bottom, float
}
}
-void menu_input::handle(event const *ev)
+bool menu_input::handle(event const *ev)
{
input_item_data *seqchangeditem = nullptr;
bool invalidate = false;
+ bool redraw = false;
// process the menu
if (pollingitem)
@@ -421,6 +423,11 @@ void menu_input::handle(event const *ev)
seq_poll.reset();
machine().ui_input().reset();
}
+ else
+ {
+ // always redraw to ensure it updates as soon as possible in response to changes
+ redraw = true;
+ }
}
else if (ev && ev->itemref)
{
@@ -516,6 +523,7 @@ void menu_input::handle(event const *ev)
}
record_next = false;
lastitem = &item;
+ redraw = true;
}
// flip between set and append
@@ -531,6 +539,7 @@ void menu_input::handle(event const *ev)
{
record_next = !record_next;
}
+ redraw = true;
}
}
@@ -546,6 +555,8 @@ void menu_input::handle(event const *ev)
// if the menu is invalidated, clear it now
if (invalidate)
reset(reset_options::REMEMBER_POSITION);
+
+ return redraw && !invalidate;
}