src/mess/image.c
| r4138 | r4139 | |
| 203 | 203 | slot->name = astring_alloc(); |
| 204 | 204 | slot->working_directory = astring_alloc(); |
| 205 | 205 | |
| 206 | /* clear error message */ |
| 207 | slot->err_message = NULL; |
| 208 | |
| 206 | 209 | /* setup the device */ |
| 207 | 210 | slot->dev = dev; |
| 208 | 211 | slot->info = image_device_getinfo(machine->config, dev); |
| r4138 | r4139 | |
| 796 | 799 | /* first unload the image */ |
| 797 | 800 | image_unload(image); |
| 798 | 801 | |
| 802 | /* clear any possible error messages */ |
| 803 | image_clear_error(slot); |
| 804 | |
| 799 | 805 | /* record the filename */ |
| 800 | 806 | slot->err = set_image_filename(slot, path); |
| 801 | 807 | if (slot->err) |
| r4138 | r4139 | |
| 926 | 932 | image->playable = NULL; |
| 927 | 933 | image->extrainfo = NULL; |
| 928 | 934 | image->basename_noext = NULL; |
| 929 | | image->err_message = NULL; |
| 930 | 935 | image->ptr = NULL; |
| 931 | 936 | } |
| 932 | 937 | |
| r4138 | r4139 | |
| 945 | 950 | /* call the unload function */ |
| 946 | 951 | if (slot->unload != NULL) |
| 947 | 952 | slot->unload(slot->dev); |
| 953 | } |
| 948 | 954 | |
| 949 | | image_clear(slot); |
| 950 | | image_clear_error(slot); |
| 951 | | } |
| 955 | image_clear(slot); |
| 956 | image_clear_error(slot); |
| 952 | 957 | } |
| 953 | 958 | |
| 954 | 959 | |