summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/menu.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-13 02:49:51 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-13 02:49:51 +1100
commit839192e7694158e8e35c039313b167d219f08de2 (patch)
treed65cb47c42bed17d7a846a6e5105b301767b698e /src/frontend/mame/ui/menu.h
parent1364bd571e7a2f27a6f49b0d1cd37c03fa795539 (diff)
-osd/windows: Fixed stupid potential deadlock on exit.
-frontend: Some changes to menu item class that will make it possbile to reduce the number of menu rebuilds.
Diffstat (limited to 'src/frontend/mame/ui/menu.h')
-rw-r--r--src/frontend/mame/ui/menu.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index e5904f2f347..a6e6c25d174 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -54,7 +54,7 @@ public:
void item_append(const std::string &text, const std::string &subtext, uint32_t flags, void *ref, menu_item_type type = menu_item_type::UNKNOWN) { item_append(std::string(text), std::string(subtext), flags, ref, type); }
void item_append(std::string &&text, uint32_t flags, void *ref, menu_item_type type = menu_item_type::UNKNOWN) { item_append(text, std::string(), flags, ref, type); }
void item_append(std::string &&text, std::string &&subtext, uint32_t flags, void *ref, menu_item_type type = menu_item_type::UNKNOWN);
- void item_append(menu_item item) { item_append(item.text, item.subtext, item.flags, item.ref, item.type); }
+ void item_append(menu_item item) { item_append(item.text(), item.subtext(), item.flags(), item.ref(), item.type()); }
void item_append(menu_item_type type, uint32_t flags = 0);
void item_append_on_off(const std::string &text, bool state, uint32_t flags, void *ref, menu_item_type type = menu_item_type::UNKNOWN);
@@ -150,7 +150,7 @@ protected:
int item_count() const { return m_items.size(); }
// retrieves the ref of the currently selected menu item or nullptr
- void *get_selection_ref() const { return selection_valid() ? m_items[m_selected].ref : nullptr; }
+ void *get_selection_ref() const { return selection_valid() ? m_items[m_selected].ref() : nullptr; }
menu_item &selected_item() { return m_items[m_selected]; }
menu_item const &selected_item() const { return m_items[m_selected]; }
@@ -279,7 +279,7 @@ protected:
static bool is_selectable(menu_item const &item)
{
- return (!(item.flags & menu::FLAG_DISABLE) && (item.type != menu_item_type::SEPARATOR));
+ return (!(item.flags() & menu::FLAG_DISABLE) && (item.type() != menu_item_type::SEPARATOR));
}
// get arrows status