diff --git a/src/FunctionCompiler.cc b/src/FunctionCompiler.cc index c7707ce1..1ed82c1e 100644 --- a/src/FunctionCompiler.cc +++ b/src/FunctionCompiler.cc @@ -273,7 +273,7 @@ DOLFileIndex::DOLFileIndex(const string& directory, bool compress) menu->items.emplace_back(ProgramsMenuItemID::GO_BACK, u"Go back", u"Return to the\nmain menu", 0); uint32_t next_menu_item_id = 0; - for (const auto& filename : list_directory(directory)) { + for (const auto& filename : list_directory_sorted(directory)) { if (!ends_with(filename, ".dol")) { continue; } diff --git a/src/FunctionCompiler.hh b/src/FunctionCompiler.hh index 8363b315..22b34af1 100644 --- a/src/FunctionCompiler.hh +++ b/src/FunctionCompiler.hh @@ -78,7 +78,7 @@ struct DOLFileIndex { bool files_compressed; std::vector> item_id_to_file; - std::map> name_to_file; + std::unordered_map> name_to_file; std::shared_ptr menu; DOLFileIndex() = default;