Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Jul 14, 2023
1 parent 7656158 commit a7df349
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion extras/menus/arkMenu/include/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ extern int initializeNetwork(void);
extern int connect_to_apctl(void);
extern int shutdownNetwork();
extern char* resolveHostAddress(char*);
extern int wget(char* url, char* saveAs, SceULong64* cur_download, SceULong64* max_download);
extern int wget(char* url, char* saveAs, SceULong64* cur_download=NULL, SceULong64* max_download=NULL);

#endif
3 changes: 2 additions & 1 deletion extras/menus/arkMenu/src/net_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ static void checkUpdates(){
u32 update_ver, version;
bool do_update = false;
char buf[128];
cur_download = max_download = 0;

if (common::getPspModel() == PSP_GO){
update_folder[0] = update_eboot[0] = 'e';
Expand Down Expand Up @@ -255,7 +256,7 @@ static void checkUpdates(){

addMessage("Downloading psp-updatelist.txt");

wget((char*)path.c_str(), "psp-updatelist.txt", &cur_download, &max_download);
wget((char*)path.c_str(), "psp-updatelist.txt");

updater_url = parsePspUpdateList(&update_ver);

Expand Down
6 changes: 3 additions & 3 deletions extras/menus/arkMenu/src/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ int wget(char* url, char* saveAs, SceULong64* cur_download, SceULong64* max_down
if((cnx=sceHttpCreateConnectionWithURL(tpl, url, 0))<0)return cnx;
if((req=sceHttpCreateRequestWithURL(cnx, PSP_HTTP_METHOD_GET, url, 0))<0)return req;
if((ret=sceHttpSendRequest(req, 0, 0))<0)return ret;
*cur_download = 0;
sceHttpGetContentLength(req, max_download);
if (cur_download) *cur_download = 0;
if (max_download) sceHttpGetContentLength(req, max_download);
if(saveAs){
SceUID fd=sceIoOpen(saveAs, PSP_O_WRONLY | PSP_O_CREAT, 0777);
while((ret=sceHttpReadData(req,buf,sizeof(buf)))>0){
sceIoWrite(fd,buf,ret);
*cur_download += ret;
if (cur_download) *cur_download += ret;
}
ret=sceIoClose(fd);
}else{//store in ram
Expand Down
2 changes: 1 addition & 1 deletion extras/menus/xMenu/src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void Menu::run(){
version << " DEBUG";
#endif

version << " (Memory Stick Speedup: " << (se_config->msspeed)? "on)" : "off)";
version << " (Memory Stick Speedup: " << (se_config->msspeed)? "Enabled)" : "Disabled)";

ark_version = version.str();

Expand Down

0 comments on commit a7df349

Please sign in to comment.