summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-01-06 19:09:16 +1100
committer Vas Crabb <vas@vastheman.com>2021-01-06 19:09:16 +1100
commit8228719f036324734b804b1488c6233fe14b0b36 (patch)
tree3957e5e8515d11eabc00558690f7b83cc23743fb /src/frontend/mame
parent542cf128ba89e8554c6d595264b2b7b68b7fb25a (diff)
Tidy up loose ends:
* Fixed a couple of fixed-size buffers in Windows OSD code. * Marked MAME as aware of long paths in Windows manifest. * Made a cleaner, thread-safe API for getting volume names. * Added compile-time option to disable recompiler W^X mode. * NuBus image device current directory doesn't need to be pinned.
Diffstat (limited to 'src/frontend/mame')
-rw-r--r--src/frontend/mame/ui/dirmenu.cpp3
-rw-r--r--src/frontend/mame/ui/filesel.cpp3
2 files changed, 2 insertions, 4 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
diff --git a/src/frontend/mame/ui/filesel.cpp b/src/frontend/mame/ui/filesel.cpp
index 0c38129ed9f..88d6027339e 100644
--- a/src/frontend/mame/ui/filesel.cpp
+++ b/src/frontend/mame/ui/filesel.cpp
@@ -413,8 +413,7 @@ void menu_file_selector::populate(float &customtop, float &custombottom)
selected_entry = &append_entry(SELECTOR_ENTRY_TYPE_SOFTWARE_LIST, "", "");
// add the drives
- int i = 0;
- for (char const *volume_name = osd_get_volume_name(i); volume_name; volume_name = osd_get_volume_name(++i))
+ for (std::string const &volume_name : osd_get_volume_names())
append_entry(SELECTOR_ENTRY_TYPE_DRIVE, volume_name, volume_name);
// mark first filename entry