Previous 15994 Revisions Next

r10039 Friday 14th January, 2011 at 22:08:07 UTC by Fabio Priuli
* Improved the way software names are displayed by the Internal File Manager when loading from software list
* Fixed wrong name being displayed when loading with shortname:partname.
[src/emu]devimage.c diimage.h uiimage.c

src/emu/diimage.h
r10038r10039
253253   const char* extrainfo() { return m_extrainfo; }
254254
255255   const software_info *software_entry() { return m_software_info_ptr; }
256   const software_part *part_entry() { return m_software_part_ptr; }
256257
257258   virtual void set_working_directory(const char *working_directory) { m_working_directory = working_directory; }
258259   virtual const char * working_directory();
src/emu/uiimage.c
r10038r10039
903903{
904904   char buffer[2048];
905905   device_image_interface *image = NULL;
906   const char *entry_basename;
906   astring tmp_name;
907907
908908   /* cycle through all devices for this system */
909909   for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image))
r10038r10039
914914         image->image_config().devconfig().name());
915915
916916      /* get the base name */
917      entry_basename = image->basename();
917      if (image->basename() != NULL)
918      {
919         tmp_name.cpy(image->basename());
918920
921         /* the image has been loaded through softlist, also show the loaded part */
922         if (image->part_entry() != NULL)
923         {
924            const software_part *tmp = image->part_entry();
925            if (tmp->name != NULL)
926            {
927               tmp_name.cat(" (");
928               tmp_name.cat(tmp->name);
929               tmp_name.cat(")");
930            }
931         }
932      }
933      else
934         tmp_name.cpy("---");
935
919936      /* record the menu item */
920      ui_menu_item_append(menu, buffer, (entry_basename != NULL) ? entry_basename : "---", 0, (void *) image);
937      ui_menu_item_append(menu, buffer, tmp_name.cstr(), 0, (void *) image);
921938   }
922939
923940   /* set up custom render proc */
src/emu/devimage.c
r10038r10039
431431
432432    /* record the filename */
433433    m_err = set_image_filename(path);
434
434435    if (m_err)
435436        goto done;
436437
437438   /* Check if there's a software list defined for this device and use that if we're not creating an image */
438439   if (!filename_has_period)
440   {
439441      softload = load_software_part( this, path, &m_software_info_ptr, &m_software_part_ptr, &m_full_software_name );
442      // if we had launched from softlist with a specified part, e.g. "shortname:part"
443      // we would have recorded the wrong name, so record it again based on software_info
444      if (m_software_info_ptr->shortname != NULL)
445         m_err = set_image_filename(m_software_info_ptr->shortname);
446   }
440447
441448   if (is_create || filename_has_period)
442449   {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team