diff options
author | 2016-06-24 23:53:38 +1000 | |
---|---|---|
committer | 2016-06-24 23:53:38 +1000 | |
commit | 20a95045e16ab69cfb13c6d3cf520e63aa553102 (patch) | |
tree | 3a4b4bab3ed8afaedc6a9c499c5737dc6df5d91e /src/emu/fileio.cpp | |
parent | 83a9cf42056efe9c78d39b89e4ba394a07c79dce (diff) | |
parent | 7509a56dc0cf8a380eada014167b8075fbcbcdc9 (diff) |
Load save state preparations [Nathan Woods]
* A number of changes and refactorings in preparation for a new load/save state menu. Most notably, I am C++-ifying osd_directory (now osd::directory) and changing osd_stat() to return std::unique_ptrosd::directory::entry
* Take note that this change completely omits POSIX support, simply because I lack a development environment to support it. This will have to be done by someone else.
Diffstat (limited to 'src/emu/fileio.cpp')
-rw-r--r-- | src/emu/fileio.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index 78be6e10faa..55231dc845c 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -91,7 +91,7 @@ file_enumerator::~file_enumerator() { // close anything open if (m_curdir != nullptr) - osd_closedir(m_curdir); + delete m_curdir; } @@ -100,7 +100,7 @@ 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) @@ -113,16 +113,16 @@ const osd_directory_entry *file_enumerator::next() 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); + delete m_curdir; m_curdir = nullptr; } } |