summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-06-17 22:39:08 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-06-17 22:39:08 +0200
commite1990e26451a556ee20f91da39b0dbf8d1030a01 (patch)
tree4223864cb11c96fa77217d87265926899eaee1f1 /Source/Core
parent68fef47aef76137049dc8cfd6f838a1f77dd6a23 (diff)
IOS/ES: Fix title ordering
On a real Wii, the title list is not in any particular order. However, because of how the flash filesystem works, titles such as 1-2 are *never* in the first position. We must keep this behaviour, or some versions of the System Menu may break.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/IOS/ES/NandUtils.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/Core/IOS/ES/NandUtils.cpp b/Source/Core/Core/IOS/ES/NandUtils.cpp
index 4bbbbfbb65..b82d5daae4 100644
--- a/Source/Core/Core/IOS/ES/NandUtils.cpp
+++ b/Source/Core/Core/IOS/ES/NandUtils.cpp
@@ -6,6 +6,7 @@
#include <array>
#include <cctype>
#include <cinttypes>
+#include <functional>
#include <iterator>
#include <string>
#include <unordered_set>
@@ -89,6 +90,12 @@ static std::vector<u64> GetTitlesInTitleOrImport(const std::string& titles_dir)
}
}
+ // On a real Wii, the title list is not in any particular order. However, because of how
+ // the flash filesystem works, titles such as 1-2 are *never* in the first position.
+ // We must keep this behaviour, or some versions of the System Menu may break.
+
+ std::sort(title_ids.begin(), title_ids.end(), std::greater<>());
+
return title_ids;
}