summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/dirmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/ui/dirmenu.cpp')
-rw-r--r--src/frontend/mame/ui/dirmenu.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/dirmenu.cpp b/src/frontend/mame/ui/dirmenu.cpp
index bda3c74cf62..6a7fa0c1aef 100644
--- a/src/frontend/mame/ui/dirmenu.cpp
+++ b/src/frontend/mame/ui/dirmenu.cpp
@@ -384,13 +384,12 @@ void menu_add_change_folder::handle()
void menu_add_change_folder::populate(float &customtop, float &custombottom)
{
// open a path
- const char *volume_name = nullptr;
file_enumerator path(m_current_path.c_str());
const osd::directory::entry *dirent;
int folders_count = 0;
// add the drives
- for (int i = 0; (volume_name = osd_get_volume_name(i)) != nullptr; ++i)
+ for (std::string const &volume_name : osd_get_volume_names())
item_append(volume_name, "[DRIVE]", 0, (void *)(uintptr_t)++folders_count);
// add the directories