Previous 15994 Revisions Next

r13689 Friday 23rd December, 2011 at 10:18:56 UTC by Miodrag Milanović
softlist now copies all parts too to loaded software_info section (no whatsnew)
[src/emu]softlist.c

src/emu/softlist.c
r13688r13689
16431643      if ( software_info_ptr->publisher )
16441644         (*sw_info)->publisher = auto_strdup( image->device().machine(), software_info_ptr->publisher );
16451645
1646      *sw_part = auto_alloc_clear( image->device().machine(), software_part );
1647      (*sw_part)->name = auto_strdup( image->device().machine(), software_part_ptr->name );
1648      if ( software_part_ptr->interface_ )
1649         (*sw_part)->interface_ = auto_strdup( image->device().machine(), software_part_ptr->interface_ );
1650
1651      if ( software_part_ptr->featurelist )
1646      (*sw_info)->partdata = (software_part *)auto_alloc_array_clear(image->device().machine(), UINT8, software_list_ptr->part_entries * sizeof(software_part) );
1647      software_part *new_part = (*sw_info)->partdata;
1648      for (software_part *swp = software_find_part(software_info_ptr, NULL, NULL); swp != NULL; swp = software_part_next(swp))
16521649      {
1653         feature_list *list = software_part_ptr->featurelist;
1654         feature_list *new_list = auto_alloc_clear( image->device().machine(), feature_list );
1650         if (strcmp(software_part_ptr->name,swp->name)==0) *sw_part = new_part;
1651         
1652         new_part->name = auto_strdup( image->device().machine(), swp->name );
1653         if ( swp->interface_ )
1654            new_part->interface_ = auto_strdup( image->device().machine(), swp->interface_ );
16551655
1656         (*sw_part)->featurelist = new_list;
1656         if ( swp->featurelist )
1657         {
1658            feature_list *list = swp->featurelist;
1659            feature_list *new_list = auto_alloc_clear( image->device().machine(), feature_list );
16571660
1658         new_list->name = auto_strdup( image->device().machine(), list->name );
1659         new_list->value = auto_strdup( image->device().machine(), list->value );
1661            new_part->featurelist = new_list;
16601662
1661         list = list->next;
1662
1663         while( list )
1664         {
1665            new_list->next = auto_alloc_clear( image->device().machine(), feature_list );
1666            new_list = new_list->next;
16671663            new_list->name = auto_strdup( image->device().machine(), list->name );
16681664            new_list->value = auto_strdup( image->device().machine(), list->value );
16691665
16701666            list = list->next;
1671         }
16721667
1673         new_list->next = NULL;
1668            while( list )
1669            {
1670               new_list->next = auto_alloc_clear( image->device().machine(), feature_list );
1671               new_list = new_list->next;
1672               new_list->name = auto_strdup( image->device().machine(), list->name );
1673               new_list->value = auto_strdup( image->device().machine(), list->value );
1674
1675               list = list->next;
1676            }
1677            new_list->next = NULL;
1678         }         
1679         new_part++;
16741680      }
16751681
16761682      /* Tell the world which part we actually loaded */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team