mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-10-01 10:27:19 +00:00
Add WiFi Checks for things, which need it.
For example by updating Stores or the store search download functions.
This commit is contained in:
@@ -450,6 +450,7 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
}
|
||||
|
||||
if ((hDown & KEY_Y) || (hDown & KEY_TOUCH && touching(touch, arrowPos[5]))) {
|
||||
if (checkWifiStatus() == true) {
|
||||
if (Gui::promptMsg(Lang::get("WOULD_YOU_LIKE_UPDATE"))) {
|
||||
if(storeInfo[selection].url != "" && storeInfo[selection].url != "MISSING: storeInfo.url" &&
|
||||
storeInfo[selection].file != "" && storeInfo[selection].file != "MISSING: storeInfo.file") {
|
||||
@@ -470,6 +471,9 @@ void UniStore::StoreSelectionLogic(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
loadStoreDesc();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
notConnectedMsg();
|
||||
}
|
||||
}
|
||||
|
||||
if (hDown & KEY_A) {
|
||||
@@ -863,11 +867,15 @@ void UniStore::GitHubLogic(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, GitHubPos[2])) {
|
||||
if (checkWifiStatus() == true) {
|
||||
std::string URL = "https://github.com/";
|
||||
URL += OwnerAndRepo;
|
||||
URL += "/raw/master/unistore/";
|
||||
URL += fileName;
|
||||
ScriptHelper::downloadFile(URL, Config::StorePath + fileName, Lang::get("DOWNLOADING") + fileName);
|
||||
} else {
|
||||
notConnectedMsg();
|
||||
}
|
||||
}
|
||||
|
||||
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
|
||||
@@ -912,7 +920,11 @@ void UniStore::FullURLLogic(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
}
|
||||
|
||||
if (hDown & KEY_TOUCH && touching(touch, GitHubPos[2])) {
|
||||
if (checkWifiStatus() == true) {
|
||||
ScriptHelper::downloadFile(FullURL, Config::StorePath + fileName, Lang::get("DOWNLOADING") + fileName);
|
||||
} else {
|
||||
notConnectedMsg();
|
||||
}
|
||||
}
|
||||
|
||||
if ((hDown & KEY_B) || (hDown & KEY_TOUCH && touching(touch, arrowPos[2]))) {
|
||||
|
||||
Reference in New Issue
Block a user