diff options
author | 2016-06-24 23:28:42 +0200 | |
---|---|---|
committer | 2016-06-24 23:28:42 +0200 | |
commit | 798bb7956756fcb8f356dcaeeaf7fe1e31dab8da (patch) | |
tree | 038713be6e2512f886d55a9ac9a9afc92a70d9c8 /src/tools/romcmp.cpp | |
parent | bc37304ef96e335810e7dc10367e7e7faa2d3c1d (diff) | |
parent | b3491464e41b6afea81e188fe6a350d4f778854b (diff) |
Merge remote-tracking branch 'origin/master' into netlist_dev
Diffstat (limited to 'src/tools/romcmp.cpp')
-rw-r--r-- | src/tools/romcmp.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/tools/romcmp.cpp b/src/tools/romcmp.cpp index 641667b6342..0545da64c64 100644 --- a/src/tools/romcmp.cpp +++ b/src/tools/romcmp.cpp @@ -448,22 +448,20 @@ static void printname(const fileinfo *file1,const fileinfo *file2,float score,in static int load_files(int i, int *found, const char *path) { - osd_directory *dir; - /* attempt to open as a directory first */ - dir = osd_opendir(path); - if (dir != nullptr) + auto dir = osd::directory::open(path); + if (dir) { - const osd_directory_entry *d; + const osd::directory::entry *d; /* load all files in directory */ - while ((d = osd_readdir(dir)) != nullptr) + while ((d = dir->read()) != nullptr) { const char *d_name = d->name; char buf[255+1]; sprintf(buf, "%s%c%s", path, PATH_DELIM, d_name); - if (d->type == ENTTYPE_FILE) + if (d->type == osd::directory::entry::entry_type::FILE) { UINT64 size = d->size; while (size && (size & 1) == 0) size >>= 1; @@ -484,7 +482,7 @@ static int load_files(int i, int *found, const char *path) } } } - osd_closedir(dir); + dir.reset(); } /* if not, try to open as a ZIP file */ |