diff options
Diffstat (limited to 'src/osd/modules/render')
-rw-r--r-- | src/osd/modules/render/bgfx/chainentryreader.cpp | 10 | ||||
-rw-r--r-- | src/osd/modules/render/bgfx/chainmanager.cpp | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/osd/modules/render/bgfx/chainentryreader.cpp b/src/osd/modules/render/bgfx/chainentryreader.cpp index 39edd9f685c..278a795f6e7 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()); - if (directory != nullptr) + osd::directory::ptr directory = osd::directory::open(directory_path); + if (directory) { - 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"); @@ -159,8 +159,6 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, std::s } } } - - osd_closedir(directory); } } } diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp index 34c891eb009..d4c59f9bb6a 100644 --- a/src/osd/modules/render/bgfx/chainmanager.cpp +++ b/src/osd/modules/render/bgfx/chainmanager.cpp @@ -91,12 +91,12 @@ void chain_manager::destroy_unloaded_chains() void chain_manager::find_available_chains(std::string root, std::string path) { - osd_directory *directory = osd_opendir((root + path).c_str()); + osd::directory::ptr directory = osd::directory::open(root + path); 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 name(entry->name); std::string extension(".json"); @@ -114,7 +114,7 @@ void chain_manager::find_available_chains(std::string root, std::string path) } } } - else if (entry->type == ENTTYPE_DIR) + else if (entry->type == osd::directory::entry::entry_type::DIR) { std::string name = entry->name; if (!(name == "." || name == "..")) @@ -128,8 +128,6 @@ void chain_manager::find_available_chains(std::string root, std::string path) } } } - - osd_closedir(directory); } } |