sort DOL files in Programs menu
This commit is contained in:
@@ -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);
|
menu->items.emplace_back(ProgramsMenuItemID::GO_BACK, u"Go back", u"Return to the\nmain menu", 0);
|
||||||
|
|
||||||
uint32_t next_menu_item_id = 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")) {
|
if (!ends_with(filename, ".dol")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ struct DOLFileIndex {
|
|||||||
|
|
||||||
bool files_compressed;
|
bool files_compressed;
|
||||||
std::vector<std::shared_ptr<DOLFile>> item_id_to_file;
|
std::vector<std::shared_ptr<DOLFile>> item_id_to_file;
|
||||||
std::map<std::string, std::shared_ptr<DOLFile>> name_to_file;
|
std::unordered_map<std::string, std::shared_ptr<DOLFile>> name_to_file;
|
||||||
std::shared_ptr<const Menu> menu;
|
std::shared_ptr<const Menu> menu;
|
||||||
|
|
||||||
DOLFileIndex() = default;
|
DOLFileIndex() = default;
|
||||||
|
|||||||
Reference in New Issue
Block a user