src/mess/filemngr.c
| r2886 | r2887 | |
| 222 | 222 | *menu_items = 0; |
| 223 | 223 | *selected = 0; |
| 224 | 224 | |
| 225 | /* open the directory */ |
| 226 | err = zippath_opendir(path, &directory); |
| 227 | if (err != FILERR_NONE) |
| 228 | goto done; |
| 229 | |
| 225 | 230 | /* add the "[empty slot]" entry */ |
| 226 | 231 | memset(&item_list[*menu_items], 0, sizeof(item_list[*menu_items])); |
| 227 | 232 | item_list[*menu_items].text = SLOT_EMPTY; |
| r2886 | r2887 | |
| 229 | 234 | (*menu_items)++; |
| 230 | 235 | |
| 231 | 236 | info = image_device_getinfo(device->machine->config, device); |
| 232 | | if (0 && info.creatable) /* NYI */ |
| 237 | if (0 && info.creatable && !zippath_is_zip(directory)) /* NYI */ |
| 233 | 238 | { |
| 234 | 239 | /* add the "[create]" entry */ |
| 235 | 240 | memset(&item_list[*menu_items], 0, sizeof(item_list[*menu_items])); |
| r2886 | r2887 | |
| 249 | 254 | (*menu_items)++; |
| 250 | 255 | } |
| 251 | 256 | |
| 252 | | /* open the directory */ |
| 253 | | err = zippath_opendir(path, &directory); |
| 254 | | if (err != FILERR_NONE) |
| 255 | | goto done; |
| 256 | | |
| 257 | 257 | /* build the menu for each item */ |
| 258 | 258 | while((dirent = zippath_readdir(directory)) != NULL) |
| 259 | 259 | { |
| r2886 | r2887 | |
| 412 | 412 | { |
| 413 | 413 | /* create */ |
| 414 | 414 | fs_state.i = ui_menu_stack_push(menu_file_create, 0); |
| 415 | goto done; |
| 415 | 416 | } |
| 416 | 417 | else |
| 417 | 418 | { |