Previous 15994 Revisions Next

r2887 Tuesday 24th June, 2008 at 12:27:28 UTC by Nathan Woods
File Manager updates
[src/mess]filemngr.c zippath.c zippath.h

src/mess/zippath.c
r2886r2887
490490   return result;
491491}
492492
493
494
495/*-------------------------------------------------
496    zippath_is_zip - returns TRUE if this path is
497   a ZIP path or FALSE if not
498-------------------------------------------------*/
499
500int zippath_is_zip(zippath_directory *directory)
501{
502   return directory->zipfile != NULL;
503}
src/mess/zippath.h
r2886r2887
5151/* reads a directory entry */
5252const osd_directory_entry *zippath_readdir(zippath_directory *directory);
5353
54/* returns TRUE if this path is a ZIP path or FALSE if not */
55int zippath_is_zip(zippath_directory *directory);
5456
57
58
5559#endif /* __ZIPPATH_H__ */
src/mess/filemngr.c
r2886r2887
222222   *menu_items = 0;
223223   *selected = 0;
224224
225   /* open the directory */
226   err = zippath_opendir(path, &directory);
227   if (err != FILERR_NONE)
228      goto done;
229
225230   /* add the "[empty slot]" entry */
226231   memset(&item_list[*menu_items], 0, sizeof(item_list[*menu_items]));
227232   item_list[*menu_items].text = SLOT_EMPTY;
r2886r2887
229234   (*menu_items)++;
230235
231236   info = image_device_getinfo(device->machine->config, device);
232   if (0 && info.creatable)   /* NYI */
237   if (0 && info.creatable && !zippath_is_zip(directory))   /* NYI */
233238   {
234239      /* add the "[create]" entry */
235240      memset(&item_list[*menu_items], 0, sizeof(item_list[*menu_items]));
r2886r2887
249254      (*menu_items)++;
250255   }
251256
252   /* open the directory */
253   err = zippath_opendir(path, &directory);
254   if (err != FILERR_NONE)
255      goto done;
256
257257   /* build the menu for each item */
258258   while((dirent = zippath_readdir(directory)) != NULL)
259259   {
r2886r2887
412412            {
413413               /* create */
414414               fs_state.i = ui_menu_stack_push(menu_file_create, 0);
415               goto done;
415416            }
416417            else
417418            {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team