diff options
author | 2015-05-02 19:41:03 +0200 | |
---|---|---|
committer | 2015-05-02 19:41:03 +0200 | |
commit | cc3b682e52bf097d31db78032aad01d6a0b12e94 (patch) | |
tree | 860c97ca011b64c31a5ad277f5cea2b1d86eeaf0 /src/emu/ui/filemngr.c | |
parent | 7df6a23ba2ae1c1df94ed8cc2398f2546f339997 (diff) | |
parent | a649a95488e1fc85813dda747dc74c596496bd1c (diff) |
Merge pull request #1 from mamedev/master
Sync to master
Diffstat (limited to 'src/emu/ui/filemngr.c')
-rw-r--r-- | src/emu/ui/filemngr.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c index 38e4a55a9c7..578721b233b 100644 --- a/src/emu/ui/filemngr.c +++ b/src/emu/ui/filemngr.c @@ -30,9 +30,9 @@ ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_cont // This warning string is used when accessing from the force_file_manager call, i.e. // when the file manager is loaded top front in the case of mandatory image devices if (warnings) - m_warnings.cpy(warnings); + m_warnings.assign(warnings); else - m_warnings.reset(); + m_warnings.clear(); m_curr_selected = FALSE; } @@ -62,15 +62,15 @@ void ui_menu_file_manager::custom_render(void *selectedref, float top, float bot } -void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring &instance, astring &filename) +void ui_menu_file_manager::fill_image_line(device_image_interface *img, std::string &instance, std::string &filename) { // get the image type/id - instance.printf("%s (%s)", img->instance_name(), img->brief_instance_name()); + strprintf(instance,"%s (%s)", img->instance_name(), img->brief_instance_name()); // get the base name if (img->basename() != NULL) { - filename.cpy(img->basename()); + filename.assign(img->basename()); // if the image has been loaded through softlist, also show the loaded part if (img->part_entry() != NULL) @@ -78,20 +78,20 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring const software_part *tmp = img->part_entry(); if (tmp->name() != NULL) { - filename.cat(" ("); - filename.cat(tmp->name()); + filename.append(" ("); + filename.append(tmp->name()); // also check if this part has a specific part_id (e.g. "Map Disc", "Bonus Disc", etc.), and in case display it if (img->get_feature("part_id") != NULL) { - filename.cat(": "); - filename.cat(img->get_feature("part_id")); + filename.append(": "); + filename.append(img->get_feature("part_id")); } - filename.cat(")"); + filename.append(")"); } } } else - filename.cpy("---"); + filename.assign("---"); } //------------------------------------------------- @@ -100,11 +100,11 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring void ui_menu_file_manager::populate() { - astring buffer, tmp_inst, tmp_name; + std::string buffer, tmp_inst, tmp_name; bool first_entry = true; - astring prev_owner; + std::string prev_owner; - if (m_warnings) + if (!m_warnings.empty()) { item_append(m_warnings.c_str(), NULL, MENU_FLAG_DISABLE, NULL); item_append("", NULL, MENU_FLAG_DISABLE, NULL); @@ -138,7 +138,7 @@ void ui_menu_file_manager::populate() first_entry = false; else item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); - buffer.printf("[root%s]", dev->tag()); + strprintf(buffer, "[root%s]", dev->tag()); item_append(buffer.c_str(), NULL, 0, NULL); tag_appended = true; } |