summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2019-11-17 04:12:54 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2019-11-17 04:12:54 +1100
commit80eb09f9666984a3ae957949f932567e20596021 (patch)
tree5f6b1395c576b64d12ac692bde65ff30d84f1250 /src/frontend
parent9773421beea4f62d410bd970a5d4a7acf413be36 (diff)
get rid of some pointless members of input mapping menu (nw)
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/ui/inputmap.cpp23
-rw-r--r--src/frontend/mame/ui/inputmap.h2
2 files changed, 9 insertions, 16 deletions
diff --git a/src/frontend/mame/ui/inputmap.cpp b/src/frontend/mame/ui/inputmap.cpp
index 6d7c1b138a1..8dcfb597126 100644
--- a/src/frontend/mame/ui/inputmap.cpp
+++ b/src/frontend/mame/ui/inputmap.cpp
@@ -226,12 +226,13 @@ menu_input_specific::~menu_input_specific()
/*-------------------------------------------------
menu_input - display a menu for inputs
-------------------------------------------------*/
-menu_input::menu_input(mame_ui_manager &mui, render_container &container) : menu(mui, container), record_next(false)
+menu_input::menu_input(mame_ui_manager &mui, render_container &container)
+ : menu(mui, container)
+ , data()
+ , pollingitem(nullptr)
+ , lastitem(nullptr)
+ , record_next(false)
{
- lastitem = nullptr;
- pollingitem = nullptr;
- pollingref = nullptr;
- pollingseq = SEQ_TYPE_STANDARD;
}
menu_input::~menu_input()
@@ -328,12 +329,6 @@ void menu_input::handle()
/* if the menu is invalidated, clear it now */
if (invalidate)
{
- pollingref = nullptr;
- if (pollingitem != nullptr)
- {
- pollingref = pollingitem->ref;
- pollingseq = pollingitem->seqtype;
- }
reset(reset_options::REMEMBER_POSITION);
}
}
@@ -396,9 +391,9 @@ void menu_input::populate_sorted()
text = "(" + text + ")";
/* if we're polling this item, use some spaces with left/right arrows */
- if (pollingref == item.ref && pollingseq == item.seqtype)
+ if (&item == pollingitem)
{
- subtext.assign(" ");
+ subtext = " ";
flags |= FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW;
}
@@ -410,7 +405,7 @@ void menu_input::populate_sorted()
}
/* add the item */
- item_append(text, subtext, flags, &item);
+ item_append(std::move(text), std::move(subtext), flags, &item);
}
}
diff --git a/src/frontend/mame/ui/inputmap.h b/src/frontend/mame/ui/inputmap.h
index d790ef73d40..d0bb44fd7e0 100644
--- a/src/frontend/mame/ui/inputmap.h
+++ b/src/frontend/mame/ui/inputmap.h
@@ -64,8 +64,6 @@ protected:
void toggle_none_default(input_seq &selected_seq, input_seq &original_seq, const input_seq &selected_defseq);
data_vector data;
- const void * pollingref;
- input_seq_type pollingseq;
input_item_data * pollingitem;
private: