Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 21st, 2011  |  syntax: None  |  size: 0.82 KB  |  views: 55  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/apps/plugin.c b/apps/plugin.c
  2. index b9c2e7c..fff4be4 100644
  3. --- a/apps/plugin.c
  4. +++ b/apps/plugin.c
  5. @@ -110,6 +110,13 @@ static struct dirent *app_readdir(DIR *dirp)
  6.      return readdir(dirp);
  7.  }
  8.  #endif
  9. +#ifdef SIMULATOR
  10. +#ifdef HAVE_DIRCACHE
  11. +#define _sim_readdir readdir_cached
  12. +#else
  13. +#define _sim_readdir sim_readdir
  14. +#endif
  15. +#endif
  16.  
  17.  #if defined(HAVE_PLUGIN_CHECK_OPEN_CLOSE) && (MAX_OPEN_FILES>32)
  18.  #warning "MAX_OPEN_FILES>32, disabling plugin file open/close checking"
  19. @@ -388,7 +395,11 @@ static const struct plugin_api rockbox_api = {
  20.      /* dir */
  21.      (opendir_func)PREFIX(opendir),
  22.      (closedir_func)PREFIX(closedir),
  23. +#ifdef SIMULATOR
  24. +    (readdir_func)_sim_readdir,
  25. +#else
  26.      (readdir_func)PREFIX(readdir),
  27. +#endif
  28.      PREFIX(mkdir),
  29.      PREFIX(rmdir),
  30.      dir_exists,
  31.  
  32.  
clone this paste RAW Paste Data