/**************************************************************************** * languagefile updater * for USB Loader GX *giantpune* ***************************************************************************/ #include #include #include #include #include "UpdateLanguage.h" #include "listfiles.h" #include "menu.h" #include "network/networkops.h" #include "network/http.h" int updateLanguageFiles() { char languageFiles[20][MAXLANGUAGEFILES]; //get all the files in the language path int countfiles = GetAllDirFiles(Settings.languagefiles_path); //give up now if we didn't find any if(countfiles==0)return -2; //now from the files we got, get only the .lang files for (int cnt = 0; cnt < countfiles; cnt++) { char filename[64]; strncpy(filename, GetFileName(cnt),63); if (strcasestr(filename,".lang")) { strcpy(languageFiles[cnt],filename); } } //we assume that the network will already be init by another function // ( that has gui eletents in it because this one doesn't) int done =0,j=0; if(IsNetworkInit()) { //build the URL, save path, and download each file and save it while (j