diff options
author | 2016-06-25 03:38:23 +1000 | |
---|---|---|
committer | 2016-06-25 03:38:23 +1000 | |
commit | 770e27d5bccf20698297fe9f2e6e8a4d0ce8991c (patch) | |
tree | 2be4d03c5014bdbdbd13d0e9bd9b77d9e2033abb /src/emu/fileio.cpp | |
parent | dd5782ee92cb6072057f1586397f289712847e5b (diff) | |
parent | 5cee9e9bc4fe03dc561d3a7a87ecadcf89743e2b (diff) |
Merge branch 'load_save_state_preparations'
Diffstat (limited to 'src/emu/fileio.cpp')
-rw-r--r-- | src/emu/fileio.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index 78be6e10faa..1fe26071acb 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -89,9 +89,6 @@ file_enumerator::file_enumerator(const char *searchpath) file_enumerator::~file_enumerator() { - // close anything open - if (m_curdir != nullptr) - osd_closedir(m_curdir); } @@ -100,30 +97,29 @@ file_enumerator::~file_enumerator() // in the search path //------------------------------------------------- -const osd_directory_entry *file_enumerator::next() +const osd::directory::entry *file_enumerator::next() { // loop over potentially empty directories while (1) { // if no open directory, get the next path - while (m_curdir == nullptr) + while (!m_curdir) { // if we fail to get anything more, we're done if (!m_iterator.next(m_pathbuffer)) return nullptr; // open the path - m_curdir = osd_opendir(m_pathbuffer.c_str()); + m_curdir = osd::directory::open(m_pathbuffer.c_str()); } // get the next entry from the current directory - const osd_directory_entry *result = osd_readdir(m_curdir); + const osd::directory::entry *result = m_curdir->read(); if (result != nullptr) return result; // we're done; close this directory - osd_closedir(m_curdir); - m_curdir = nullptr; + m_curdir.reset(); } } |