summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui/inputmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/ui/inputmap.c')
-rw-r--r--src/emu/ui/inputmap.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c
index 06f1fa748d0..129d933ae92 100644
--- a/src/emu/ui/inputmap.c
+++ b/src/emu/ui/inputmap.c
@@ -92,7 +92,7 @@ void ui_menu_input_general::populate()
{
input_item_data *itemlist = NULL;
int suborder[SEQ_TYPE_TOTAL];
- astring tempstring;
+ std::string tempstring;
int sortorder = 1;
/* create a mini lookup table for sort order based on sequence type */
@@ -155,7 +155,7 @@ void ui_menu_input_specific::populate()
{
input_item_data *itemlist = NULL;
int suborder[SEQ_TYPE_TOTAL];
- astring tempstring;
+ std::string tempstring;
int port_count = 0;
/* create a mini lookup table for sort order based on sequence type */
@@ -382,9 +382,9 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist)
const char *nameformat[INPUT_TYPE_TOTAL] = { 0 };
input_item_data **itemarray, *item;
int numitems = 0, curitem;
- astring text;
- astring subtext;
- astring prev_owner;
+ std::string text;
+ std::string subtext;
+ std::string prev_owner;
bool first_entry = true;
/* create a mini lookup table for name format based on type */
@@ -420,17 +420,17 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist)
first_entry = false;
else
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- text.printf("[root%s]", item->owner_name);
+ strprintf(text, "[root%s]", item->owner_name);
item_append(text.c_str(), NULL, 0, NULL);
- prev_owner.cpy(item->owner_name);
+ prev_owner.assign(item->owner_name);
}
- text.printf(nameformat[item->type], item->name);
+ strprintf(text, nameformat[item->type], item->name);
/* if we're polling this item, use some spaces with left/right arrows */
if (pollingref == item->ref)
{
- subtext.cpy(" ");
+ subtext.assign(" ");
flags |= MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW;
}
@@ -545,7 +545,7 @@ void ui_menu_settings::populate()
ioport_field *field;
ioport_port *port;
dip_descriptor **diplist_tailptr;
- astring prev_owner;
+ std::string prev_owner;
bool first_entry = true;
/* reset the dip switch tracking */
@@ -559,7 +559,7 @@ void ui_menu_settings::populate()
if (field->type() == type && field->enabled())
{
UINT32 flags = 0;
- astring name;
+ std::string name;
/* set the left/right flags appropriately */
if (field->has_previous_setting())
@@ -574,12 +574,12 @@ void ui_menu_settings::populate()
first_entry = false;
else
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- name.printf("[root%s]", field->device().tag());
+ strprintf(name, "[root%s]", field->device().tag());
item_append(name.c_str(), NULL, 0, NULL);
- prev_owner.cpy(field->device().tag());
+ prev_owner.assign(field->device().tag());
}
- name.cpy(field->name());
+ name.assign(field->name());
item_append(name.c_str(), field->setting_name(), flags, (void *)field);
@@ -825,9 +825,9 @@ void ui_menu_analog::populate()
{
ioport_field *field;
ioport_port *port;
- astring text;
- astring subtext;
- astring prev_owner;
+ std::string text;
+ std::string subtext;
+ std::string prev_owner;
bool first_entry = true;
/* loop over input ports and add the items */
@@ -871,19 +871,19 @@ void ui_menu_analog::populate()
{
analog_item_data *data;
UINT32 flags = 0;
- astring name;
+ std::string name;
if (strcmp(field->device().tag(), prev_owner.c_str()) != 0)
{
if (first_entry)
first_entry = false;
else
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- name.printf("[root%s]", field->device().tag());
+ strprintf(name,"[root%s]", field->device().tag());
item_append(name.c_str(), NULL, 0, NULL);
- prev_owner.cpy(field->device().tag());
+ prev_owner.assign(field->device().tag());
}
- name.cpy(field->name());
+ name.assign(field->name());
/* allocate a data item for tracking what this menu item refers to */
data = (analog_item_data *)m_pool_alloc(sizeof(*data));
@@ -895,8 +895,8 @@ void ui_menu_analog::populate()
{
default:
case ANALOG_ITEM_KEYSPEED:
- text.printf("%s Digital Speed", name.c_str());
- subtext.printf("%d", settings.delta);
+ strprintf(text, "%s Digital Speed", name.c_str());
+ strprintf(subtext, "%d", settings.delta);
data->min = 0;
data->max = 255;
data->cur = settings.delta;
@@ -904,8 +904,8 @@ void ui_menu_analog::populate()
break;
case ANALOG_ITEM_CENTERSPEED:
- text.printf("%s Autocenter Speed", name.c_str());
- subtext.printf("%d", settings.centerdelta);
+ strprintf(text, "%s Autocenter Speed", name.c_str());
+ strprintf(subtext, "%d", settings.centerdelta);
data->min = 0;
data->max = 255;
data->cur = settings.centerdelta;
@@ -913,8 +913,8 @@ void ui_menu_analog::populate()
break;
case ANALOG_ITEM_REVERSE:
- text.printf("%s Reverse", name.c_str());
- subtext.cpy(settings.reverse ? "On" : "Off");
+ strprintf(text, "%s Reverse", name.c_str());
+ subtext.assign(settings.reverse ? "On" : "Off");
data->min = 0;
data->max = 1;
data->cur = settings.reverse;
@@ -922,8 +922,8 @@ void ui_menu_analog::populate()
break;
case ANALOG_ITEM_SENSITIVITY:
- text.printf("%s Sensitivity", name.c_str());
- subtext.printf("%d", settings.sensitivity);
+ strprintf(text, "%s Sensitivity", name.c_str());
+ strprintf(subtext, "%d", settings.sensitivity);
data->min = 1;
data->max = 255;
data->cur = settings.sensitivity;