src/mess/mess.c
| r8080 | r8081 | |
| 132 | 132 | { |
| 133 | 133 | if (is_image_device(device)) |
| 134 | 134 | { |
| 135 | | image_finish_load(device); |
| 135 | int result = image_finish_load(device); |
| 136 | /* did the image load fail? */ |
| 137 | if (result) |
| 138 | { |
| 139 | /* retrieve image error message */ |
| 140 | const char *image_err = image_error(device); |
| 141 | char *image_basename_str = auto_strdup(machine, image_basename(device)); |
| 142 | image_device_info info = image_device_getinfo(machine->config, device); |
| 143 | |
| 144 | /* unload all images */ |
| 145 | image_unload_all(machine); |
| 146 | |
| 147 | fatalerror_exitcode(machine, MAMERR_DEVICE, "Device %s load (%s) failed: %s", |
| 148 | info.name, |
| 149 | image_basename_str, |
| 150 | image_err); |
| 151 | } |
| 136 | 152 | } |
| 137 | 153 | } |
| 138 | 154 | |
src/mess/image.c
| r8080 | r8081 | |
| 855 | 855 | |
| 856 | 856 | done: |
| 857 | 857 | if (slot->err) { |
| 858 | | if (mame_get_phase(machine) == MAME_PHASE_RUNNING) |
| 859 | | popmessage("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, image_error(image)); |
| 860 | | else |
| 861 | | mame_printf_error("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, image_error(image)); |
| 858 | if (slot->not_init_phase) |
| 859 | { |
| 860 | if (mame_get_phase(machine) == MAME_PHASE_RUNNING) |
| 861 | popmessage("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, image_error(image)); |
| 862 | else |
| 863 | mame_printf_error("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, image_error(image)); |
| 864 | } |
| 862 | 865 | image_clear(slot); |
| 863 | 866 | } |
| 864 | 867 | else { |
| r8080 | r8081 | |
| 867 | 870 | mame_schedule_hard_reset(machine); |
| 868 | 871 | else |
| 869 | 872 | { |
| 870 | | if (mame_get_phase(machine) == MAME_PHASE_RUNNING) |
| 871 | | popmessage("Image '%s' was successfully %s.", path, is_create ? "created" : "loaded"); |
| 872 | | else |
| 873 | | mame_printf_info("Image '%s' was successfully %s.\n", path, is_create ? "created" : "loaded"); |
| 873 | if (slot->not_init_phase) |
| 874 | { |
| 875 | if (mame_get_phase(machine) == MAME_PHASE_RUNNING) |
| 876 | popmessage("Image '%s' was successfully %s.", path, is_create ? "created" : "loaded"); |
| 877 | else |
| 878 | mame_printf_info("Image '%s' was successfully %s.\n", path, is_create ? "created" : "loaded"); |
| 879 | } |
| 874 | 880 | } |
| 875 | 881 | } |
| 876 | 882 | |