summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-04-17 15:46:41 +0200
committer hap <happppp@users.noreply.github.com>2021-04-17 15:46:41 +0200
commit17bd34cec6295a5aa25a5ca06db8d2d4c1d930fc (patch)
tree9928c0b189ebe70a29a2ba641e3dc0bc2cd4a190
parente6b31c5b8db0ac7d733494bb947f3ddcbd90e43b (diff)
ui: add message when trying to config unavailable machine inputs
-rw-r--r--src/frontend/mame/ui/inputmap.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/inputmap.cpp b/src/frontend/mame/ui/inputmap.cpp
index 8ac4b5943c8..5b63ec0bc0f 100644
--- a/src/frontend/mame/ui/inputmap.cpp
+++ b/src/frontend/mame/ui/inputmap.cpp
@@ -114,6 +114,7 @@ void menu_input_general::populate(float &customtop, float &custombottom)
// populate the menu in a standard fashion
populate_sorted(customtop, custombottom);
+ item_append(menu_item_type::SEPARATOR);
}
void menu_input_general::update_input(input_item_data &seqchangeditem)
@@ -220,7 +221,12 @@ void menu_input_specific::populate(float &customtop, float &custombottom)
}
// populate the menu in a standard fashion
- populate_sorted(customtop, custombottom);
+ if (!data.empty())
+ populate_sorted(customtop, custombottom);
+ else
+ item_append(_("This machine has no input map."), FLAG_DISABLE, nullptr);
+
+ item_append(menu_item_type::SEPARATOR);
}
void menu_input_specific::update_input(input_item_data &seqchangeditem)
@@ -497,8 +503,6 @@ void menu_input::populate_sorted(float &customtop, float &custombottom)
item_append(std::move(text), std::move(subtext), flags, &item);
}
- item_append(menu_item_type::SEPARATOR);
-
// pre-format messages
assignprompt = util::string_format(_("Press %1$s to set\n"), machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT)));
appendprompt = util::string_format(_("Press %1$s to append\n"), machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT)));