diff options
author | 2016-06-24 23:53:38 +1000 | |
---|---|---|
committer | 2016-06-24 23:53:38 +1000 | |
commit | 20a95045e16ab69cfb13c6d3cf520e63aa553102 (patch) | |
tree | 3a4b4bab3ed8afaedc6a9c499c5737dc6df5d91e /src/osd/modules/render/bgfx/chainentryreader.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/osd/modules/render/bgfx/chainentryreader.cpp')
-rw-r--r-- | src/osd/modules/render/bgfx/chainentryreader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osd/modules/render/bgfx/chainentryreader.cpp b/src/osd/modules/render/bgfx/chainentryreader.cpp index 39edd9f685c..c169a0cd441 100644 --- a/src/osd/modules/render/bgfx/chainentryreader.cpp +++ b/src/osd/modules/render/bgfx/chainentryreader.cpp @@ -115,12 +115,12 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s directory_path += "/" + file_directory; } - osd_directory *directory = osd_opendir(directory_path.c_str()); + osd::directory *directory = osd::directory::open(directory_path.c_str()); if (directory != nullptr) { - for (const osd_directory_entry *entry = osd_readdir(directory); entry != nullptr; entry = osd_readdir(directory)) + for (const osd::directory::entry *entry = directory->read(); entry != nullptr; entry = directory->read()) { - if (entry->type == ENTTYPE_FILE) + if (entry->type == osd::directory::entry::entry_type::FILE) { std::string file(entry->name); std::string extension(".png"); @@ -160,7 +160,7 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s } } - osd_closedir(directory); + delete directory; } } } |