diff --git a/extras/menus/arkMenu/include/network.h b/extras/menus/arkMenu/include/network.h index 49882ba95..00c9e0ed9 100644 --- a/extras/menus/arkMenu/include/network.h +++ b/extras/menus/arkMenu/include/network.h @@ -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 diff --git a/extras/menus/arkMenu/src/net_mgr.cpp b/extras/menus/arkMenu/src/net_mgr.cpp index 9af58e7c5..c37a17800 100644 --- a/extras/menus/arkMenu/src/net_mgr.cpp +++ b/extras/menus/arkMenu/src/net_mgr.cpp @@ -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'; @@ -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); diff --git a/extras/menus/arkMenu/src/network.cpp b/extras/menus/arkMenu/src/network.cpp index 40f1cf4c6..0136b55cc 100644 --- a/extras/menus/arkMenu/src/network.cpp +++ b/extras/menus/arkMenu/src/network.cpp @@ -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 diff --git a/extras/menus/xMenu/src/menu.cpp b/extras/menus/xMenu/src/menu.cpp index 9a1deff5e..ff4f35728 100644 --- a/extras/menus/xMenu/src/menu.cpp +++ b/extras/menus/xMenu/src/menu.cpp @@ -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();