Skip to content

Commit

Permalink
arreglado una fusionalidad rota en las actualizaciones
Browse files Browse the repository at this point in the history
  • Loading branch information
Kronos2308 committed May 24, 2023
1 parent bdd4020 commit 9aaa9e7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
VERSION_MAJOR := 2
VERSION_MINOR := 7
VERSION_MICRO := 3
VERSION_MICRO := 4

VERSION_EXDAT := 1
APP_TITLE := RipJKAnimeNX
Expand Down
1 change: 1 addition & 0 deletions Release.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@echo off
set PATH=c:\devkitPro\msys2\usr\bin;%PATH%
echo RipJKForwader ------------------------------------
title RipJKForwader
if not exist romfs\05B9DB505ABBE000.nsp (
Expand Down
Binary file modified out/RipJKAnimeNX.nro
Binary file not shown.
Binary file modified out/RipJKAnimeNX[05B9DB505ABBE000][v0].nsp
Binary file not shown.
2 changes: 1 addition & 1 deletion romfs/V
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.3
2.7.4
40 changes: 17 additions & 23 deletions source/Networking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,6 @@ bool CheckUpdates(bool force){
}

string Nurl= asset[0]["browser_download_url"];
/*
if (config["Beta"] == 1) {
Nurl= config["Beta_URL"].get<string>();
}
*/
//check if URl is ok
if (Nurl.find(".nsp") == string::npos) {
std::cout << "- NO " << Nurl <<std::endl;
Expand All @@ -449,23 +444,11 @@ bool CheckUpdates(bool force){
}
std::cout << "- OK " << Nurl <<std::endl;

string fileU=rootdirectory+"UPD/update."+Ver+".nsp";
string fileU=rootdirectory+"UPD/update."+New+".nsp";

//Have the update?
json UP;
bool needDown = true;
if (read_DB(UP,fileU+".json")) {
if(UP["update"] == New) {
needDown = false;
}

}
if (!isFileExist(fileU)) {
needDown = true;
}
std::cout << Ver << " -> " << New <<std::endl;

if (needDown) {
if (!isFileExist(fileU)) {
//Download New Update
fsdevDeleteDirectoryRecursively((rootdirectory+"UPD").c_str());
mkdir((rootdirectory+"UPD").c_str(), 0777);
Expand All @@ -475,9 +458,6 @@ bool CheckUpdates(bool force){
std::cout << "Download error" << New <<std::endl;
return false;
} else {
//Store update data
//UP["update"]=New;
//write_DB(UP,fileU+".json");
std::cout << Ver << " --> " << New <<std::endl;
}
}
Expand Down Expand Up @@ -519,4 +499,18 @@ bool CheckUpdates(bool force){
On sd card root on the root dir of the app
sdmc:/JK.config
sdmc:/config/JK.config
*/
//old stuff
if (config["Beta"] == 1) {
Nurl= config["Beta_URL"].get<string>();
}
json UP;
if (read_DB(UP,fileU+".json")) {
if(UP["update"] == New) {
needDown = false;
}
}
*/

0 comments on commit 9aaa9e7

Please sign in to comment.