Previous 15994 Revisions Next

r14605 Friday 24th February, 2012 at 07:23:26 UTC by Fabio Priuli
clifront.c: slightly modified verifyroms to handle properly no-roms devices verification (wrong report message was output). no whatsnew.
[src/emu]clifront.c

src/emu/clifront.c
r14604r14605
801801      machine_config &config = dummy_drivlist.config();
802802      device_iterator iter(config.root_device());
803803      for (device_t *dev = iter.first(); dev != NULL; dev = iter.next())
804      {         
805         if (dev->owner() != NULL && (strlen(dev->shortname())>0) && dev->rom_region() != NULL && (device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE)) {
806            if (mame_strwildcmp(gamename, dev->shortname()) == 0)
804      {
805         if (mame_strwildcmp(gamename, dev->shortname()) == 0)
806         {
807            matched++;
808
809            if (dev->owner() != NULL && (strlen(dev->shortname()) > 0) && dev->rom_region() != NULL && (device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE))
807810            {
808               matched++;
809
810811               // audit the ROMs in this set
811812               media_auditor::summary summary = auditor.audit_device(dev, AUDIT_VALIDATE_FAST);
812813
813814               // if not found, count that and leave it at that
814               if (summary == media_auditor::NOTFOUND) {
815               if (summary == media_auditor::NOTFOUND)
815816                  notfound++;
816               }
817817               // else display information about what we discovered
818818               else
819819               {
r14604r14605
846846                     default:
847847                        break;
848848                  }
849               }                 
849               }
850850            }
851851         }
852      }     
853     
852      }
853
854854      slot_interface_iterator slotiter(config.root_device());
855855      for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next())
856856      {
r14604r14605
866866            for (device_t *device = subiter.first(); device != NULL; device = subiter.next())
867867               if (!device->configured())
868868                  device->config_complete();
869           
870            if (dev->rom_region() != NULL && device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE) {
871               if (mame_strwildcmp(gamename, dev->shortname()) == 0)
869
870            if (mame_strwildcmp(gamename, dev->shortname()) == 0)
871            {
872               matched++;
873
874               if (dev->rom_region() != NULL && device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE)
872875               {
873                  matched++;
874
875876                  // audit the ROMs in this set
876877                  media_auditor::summary summary = auditor.audit_device(dev, AUDIT_VALIDATE_FAST);
877878
r14604r14605
918919            const_cast<machine_config &>(config).device_remove(&config.root_device(), temptag.cstr());
919920            global_free(dev);
920921         }
921      }   
922      }
922923   }
923924
924925   // clear out any cached files
r14604r14605
929930      throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename);
930931
931932   // if we didn't get anything at all, display a generic end message
932   if (matched == 1 && correct == 0 && incorrect == 0)
933   if (matched > 0 && correct == 0 && incorrect == 0)
933934   {
934935      if (notfound > 0)
935936         throw emu_fatalerror(MAMERR_MISSING_FILES, "romset \"%s\" not found!\n", gamename);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team