mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-12-06 03:07:19 +00:00
Properly add slash check and fix JPN Lang selection.
This commit is contained in:
1 parent
b7fa9c2ba5
commit
6aec8dac77
4 files changed
+38
-21
No files matched your search
@@ -247,31 +247,43 @@ void Overlays::SelectStore(std::unique_ptr<Store> &store, std::vector<std::uniqu
|
||||
}
|
||||
|
||||
if (hidKeysDown() & KEY_A) {
|
||||
/* Load selected one. */
|
||||
if (info[selection].Version == -1) Msg::waitMsg(Lang::get("UNISTORE_INVALID_ERROR"));
|
||||
else if (info[selection].Version < 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
|
||||
else if (info[selection].Version > 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
|
||||
else {
|
||||
store = std::make_unique<Store>(_STORE_PATH + info[selection].FileName);
|
||||
StoreUtils::ResetAll(store, meta, entries);
|
||||
config->lastStore(info[selection].FileName);
|
||||
StoreUtils::SortEntries(false, SortType::LAST_UPDATED, entries);
|
||||
doOut = true;
|
||||
if (info[selection].File != "") { // Ensure to check for this.
|
||||
if (!(info[selection].File.find("/") != std::string::npos)) {
|
||||
/* Load selected one. */
|
||||
if (info[selection].Version == -1) Msg::waitMsg(Lang::get("UNISTORE_INVALID_ERROR"));
|
||||
else if (info[selection].Version < 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
|
||||
else if (info[selection].Version > 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
|
||||
else {
|
||||
store = std::make_unique<Store>(_STORE_PATH + info[selection].FileName);
|
||||
StoreUtils::ResetAll(store, meta, entries);
|
||||
config->lastStore(info[selection].FileName);
|
||||
StoreUtils::SortEntries(false, SortType::LAST_UPDATED, entries);
|
||||
doOut = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
Msg::waitMsg(Lang::get("FILE_SLASH"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hidKeysDown() & KEY_TOUCH) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
if (touching(touch, mainButtons[i])) {
|
||||
if (i + sPos < (int)info.size()) {
|
||||
if (info[i + sPos].Version == -1) Msg::waitMsg(Lang::get("UNISTORE_INVALID_ERROR"));
|
||||
else if (info[i + sPos].Version < 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
|
||||
else if (info[i + sPos].Version > 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
|
||||
else {
|
||||
store = std::make_unique<Store>(_STORE_PATH + info[i + sPos].FileName);
|
||||
StoreUtils::ResetAll(store, meta, entries);
|
||||
config->lastStore(info[i + sPos].FileName);
|
||||
doOut = true;
|
||||
if (i + sPos < (int)info.size() && info[i + sPos].File != "") { // Ensure to check for this.
|
||||
if (!(info[i + sPos].File.find("/") != std::string::npos)) {
|
||||
if (info[i + sPos].Version == -1) Msg::waitMsg(Lang::get("UNISTORE_INVALID_ERROR"));
|
||||
else if (info[i + sPos].Version < 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
|
||||
else if (info[i + sPos].Version > 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
|
||||
else {
|
||||
store = std::make_unique<Store>(_STORE_PATH + info[i + sPos].FileName);
|
||||
StoreUtils::ResetAll(store, meta, entries);
|
||||
config->lastStore(info[i + sPos].FileName);
|
||||
doOut = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
Msg::waitMsg(Lang::get("FILE_SLASH"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user