src/emu/clifront.c
| r14604 | r14605 | |
| 801 | 801 | machine_config &config = dummy_drivlist.config(); |
| 802 | 802 | device_iterator iter(config.root_device()); |
| 803 | 803 | 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)) |
| 807 | 810 | { |
| 808 | | matched++; |
| 809 | | |
| 810 | 811 | // audit the ROMs in this set |
| 811 | 812 | media_auditor::summary summary = auditor.audit_device(dev, AUDIT_VALIDATE_FAST); |
| 812 | 813 | |
| 813 | 814 | // if not found, count that and leave it at that |
| 814 | | if (summary == media_auditor::NOTFOUND) { |
| 815 | if (summary == media_auditor::NOTFOUND) |
| 815 | 816 | notfound++; |
| 816 | | } |
| 817 | 817 | // else display information about what we discovered |
| 818 | 818 | else |
| 819 | 819 | { |
| r14604 | r14605 | |
| 846 | 846 | default: |
| 847 | 847 | break; |
| 848 | 848 | } |
| 849 | | } |
| 849 | } |
| 850 | 850 | } |
| 851 | 851 | } |
| 852 | | } |
| 853 | | |
| 852 | } |
| 853 | |
| 854 | 854 | slot_interface_iterator slotiter(config.root_device()); |
| 855 | 855 | for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next()) |
| 856 | 856 | { |
| r14604 | r14605 | |
| 866 | 866 | for (device_t *device = subiter.first(); device != NULL; device = subiter.next()) |
| 867 | 867 | if (!device->configured()) |
| 868 | 868 | 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) |
| 872 | 875 | { |
| 873 | | matched++; |
| 874 | | |
| 875 | 876 | // audit the ROMs in this set |
| 876 | 877 | media_auditor::summary summary = auditor.audit_device(dev, AUDIT_VALIDATE_FAST); |
| 877 | 878 | |
| r14604 | r14605 | |
| 918 | 919 | const_cast<machine_config &>(config).device_remove(&config.root_device(), temptag.cstr()); |
| 919 | 920 | global_free(dev); |
| 920 | 921 | } |
| 921 | | } |
| 922 | } |
| 922 | 923 | } |
| 923 | 924 | |
| 924 | 925 | // clear out any cached files |
| r14604 | r14605 | |
| 929 | 930 | throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename); |
| 930 | 931 | |
| 931 | 932 | // 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) |
| 933 | 934 | { |
| 934 | 935 | if (notfound > 0) |
| 935 | 936 | throw emu_fatalerror(MAMERR_MISSING_FILES, "romset \"%s\" not found!\n", gamename); |