*Added UpdatePrompt before LoaderUpdatePrompt to make it possible to update Languagefiles/WiiTDB without waiting for new Rev

*Fixed a little compile warning i added
*Fixed crash on UpdateLanguage()
This commit is contained in:
dimok321 2009-08-09 08:07:27 +00:00
parent 117dad5271
commit 80c580edb7
25 changed files with 211 additions and 42 deletions

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: David Jelinek (djelinek@hotmail.com) \n"
"Language-Team: r706 - last version on http://startgolf.tym.cz/czech.lang \n"
@ -1014,6 +1014,9 @@ msgstr "Aktualizace DOL"
msgid "Update Files"
msgstr "Zaktualizuj soubory"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Zaktualizuj vsechny jazykové soubory"
@ -1054,6 +1057,9 @@ msgstr "Cekám na zarízení USB"
msgid "Waiting..."
msgstr "Cekám..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi možnosti"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Opdatér DOL"
msgid "Update Files"
msgstr "Opdatér filer"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Opdatér alle sprogfiler"
@ -1054,6 +1057,9 @@ msgstr "Venter på USB-enhed"
msgid "Waiting..."
msgstr "Venter..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi-indstillinger"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: tj_cool\n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "DOL updaten"
msgid "Update Files"
msgstr "Bestanden Updaten"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Alle taalbestanden updaten"
@ -1054,6 +1057,9 @@ msgstr "Wachten op USB apparaat…"
msgid "Waiting..."
msgstr "Wachten..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi functies"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr ""
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr ""
msgid "Waiting..."
msgstr ""
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr ""

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr ""
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "Odottaa USB-laitetta..."
msgid "Waiting..."
msgstr "Odottaa..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr ""

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: Kin8\n"
"Language-Team: Badablek, Amour, ikya, OuahOuah, dj_skual & Kin8\n"
@ -1014,6 +1014,9 @@ msgstr "DOL seul"
msgid "Update Files"
msgstr "Mise à Jour Fichiers"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Mise à Jour tous fichiers Langue"
@ -1054,6 +1057,9 @@ msgstr "Attente d'un périphérique USB"
msgid "Waiting..."
msgstr "En attente..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "Connexion WiFi"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Aktualisiere DOL"
msgid "Update Files"
msgstr "Aktualisiere Dateien"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Aktualisiere alle Sprachdateien"
@ -1054,6 +1057,9 @@ msgstr "Warte auf USB-Gerät"
msgid "Waiting..."
msgstr "Warte..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi Eigenschaften"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: Tusk\n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "DOL Frissítése"
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "Várakozás az USB Meghajtóra"
msgid "Waiting..."
msgstr "Várakozás..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi Sajátosságok"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-08-05 10:00+0200\n"
"Last-Translator: Cambo \n"
"Language-Team: FoxeJoe & Cambo\n"
@ -1014,6 +1014,9 @@ msgstr "Solo DOL"
msgid "Update Files"
msgstr "Aggiorna File"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Aggiorna tutti i file delle lingue"
@ -1054,6 +1057,9 @@ msgstr "Caricamento Dispositivo USB"
msgid "Waiting..."
msgstr "Caricamento..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "Caratteristiche WiFi"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "DOLを更新"
msgid "Update Files"
msgstr "ファイルを更新"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "全言語ファイルを更新"
@ -1054,6 +1057,9 @@ msgstr "USBデバイスの応答待ち"
msgid "Waiting..."
msgstr "お待ちください..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi機能"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr ""
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "USB 장치를 기다리는 중"
msgid "Waiting..."
msgstr "기다리는 중..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr ""

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Oppdater DOL"
msgid "Update Files"
msgstr "Oppdater filer"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Oppdater alle språkfiler"
@ -1054,6 +1057,9 @@ msgstr "Venter på USB enhet"
msgid "Waiting..."
msgstr "Venter..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi egenskaper"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Zaktualizuj Dol"
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "Oczekiwanie na urzadzenie USB"
msgid "Waiting..."
msgstr "Oczekiwanie..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "Opcje WiFi"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Atualizar arquivo .dol"
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "Aguardando o Dispositivo USB"
msgid "Waiting..."
msgstr "Aguardando..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "Atributos WiFi"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-08-03 16:22\n"
"Last-Translator: Sky8000\n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Actualizar DOL"
msgid "Update Files"
msgstr "Actualizar ficheiros"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Actualizar todos os ficheiros de Idioma"
@ -1054,6 +1057,9 @@ msgstr "Aguardando pelo Dispositivo USB"
msgid "Waiting..."
msgstr "Aguardando..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "Rede sem fios"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: Kir\n"
"Language-Team: Kir\n"
@ -1014,6 +1014,9 @@ msgstr "Обновить DOL"
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "Ожидание USB устройства"
msgid "Waiting..."
msgstr "Ожидание..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "свойства WiFi"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr ""
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "等待 USB 设备"
msgid "Waiting..."
msgstr "等待中..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr ""

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "Actualizar DOL"
msgid "Update Files"
msgstr "Actual. Archivos"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Actualizar todos los Archiv. de Lenguaje"
@ -1054,6 +1057,9 @@ msgstr "Esperando al Dispositivo USB"
msgid "Waiting..."
msgstr "Esperando..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "Caract. WiFi"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-08-02 12:20+0200\n"
"Last-Translator: Katsurou\n"
"Language-Team: Katsurou, pirateX\n"
@ -1014,6 +1014,9 @@ msgstr "Updatera DOL"
msgid "Update Files"
msgstr "Uppdatera Filer"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr "Uppdatera alla språk-filer"
@ -1054,6 +1057,9 @@ msgstr "Väntar på USB-enhet"
msgid "Waiting..."
msgstr "Väntar..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi funktioner"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr "僅升級dol"
msgid "Update Files"
msgstr "更新檔案"
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "等待USB裝置"
msgid "Waiting..."
msgstr "等待中..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr "WiFi功能設定"

View File

@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-06 12:50+0200\n"
"POT-Creation-Date: 2009-08-09 09:34+0200\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -1014,6 +1014,9 @@ msgstr ""
msgid "Update Files"
msgstr ""
msgid "Update WiiTDB"
msgstr ""
msgid "Update all Language Files"
msgstr ""
@ -1054,6 +1057,9 @@ msgstr "USB Aygiti için Bekleniyor"
msgid "Waiting..."
msgstr "Bekliyor..."
msgid "What do you want to update?"
msgstr ""
msgid "WiFi Features"
msgstr ""

View File

@ -14,13 +14,13 @@
#include "network/http.h"
int updateLanguageFiles() {
char languageFiles[20][MAXLANGUAGEFILES];
char languageFiles[50][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;
if (!countfiles) return -2;
//now from the files we got, get only the .lang files
for (int cnt = 0; cnt < countfiles; cnt++) {
@ -31,9 +31,11 @@ int updateLanguageFiles() {
}
}
subfoldercreate(Settings.languagefiles_path);
//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;
int done = 0,j = 0;
if (IsNetworkInit()) {
//build the URL, save path, and download each file and save it
while (j<countfiles) {
@ -47,10 +49,12 @@ int updateLanguageFiles() {
if (file.data != NULL) {
FILE * pfile;
pfile = fopen(savepath, "wb");
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
free(file.data);
done++;
if(pfile != NULL) {
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
free(file.data);
done++;
}
}
j++;

View File

@ -5,7 +5,7 @@
#ifndef ___UPDATELANGUAGE_H_
#define ___UPDATELANGUAGE_H_
#define MAXLANGUAGEFILES 30
#define MAXLANGUAGEFILES 50
//! Checks the language path for files ending in .lang and updates them (up to MAXLANGUAGEFILES)
//! This function expects that the network is already init before it is called

View File

@ -874,14 +874,14 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
if (WPAD_Probe(i, NULL) == WPAD_ERR_NONE) { // controller connected
level = (userInput[i].wpad.battery_level / 100.0) * 4;
if (level > 4) level = 4;
if (level <= 1) {
batteryBarImg[i]->SetImage(&batteryBarRed);
batteryImg[i]->SetImage(&batteryRed);
} else {
batteryBarImg[i]->SetImage(&batteryBar);
}
batteryImg[i]->SetTile(level);
batteryBtn[i]->SetAlpha(255);
@ -2349,7 +2349,8 @@ ProgressDownloadWindow(int choice2) {
#ifdef NOTFULLCHANNEL
int ProgressUpdateWindow() {
int ret = 0, failed = 0;
int ret = 0, failed = 0, updatemode = -1;
GuiWindow promptWindow(472,320);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
@ -2496,11 +2497,18 @@ int ProgressUpdateWindow() {
__Menu_GetEntries();
if (IsNetworkInit() && ret >= 0) {
updatemode = WindowPrompt(tr("What do you want to update?"), 0, "USBLoader GX", "WiiTDB Files", "Languagefile", "Cancel");
mainWindow->SetState(STATE_DISABLED);
promptWindow.SetState(STATE_DEFAULT);
mainWindow->ChangeFocus(&promptWindow);
if(updatemode == 1) {
int newrev = CheckUpdate();
if (newrev > 0) {
sprintf(msg, "Rev%i %s.", newrev, tr("available"));
int choice = WindowPrompt(msg, tr("How do you want to update?"), tr("Update DOL"), tr("Update All"), tr("Cancel"));
int choice = WindowPrompt(msg, tr("How do you want to update?"), tr("Update DOL"), tr("Update All"), tr("Update WiiTDB"), tr("Cancel"));
mainWindow->SetState(STATE_DISABLED);
promptWindow.SetState(STATE_DEFAULT);
mainWindow->ChangeFocus(&promptWindow);
@ -2583,6 +2591,7 @@ int ProgressUpdateWindow() {
file = downloadfile(XMLurl);
if (file.data != NULL) {
sprintf(xmliconpath, "%swiitdb.zip", Settings.titlestxt_path);
subfoldercreate(xmliconpath);
pfile = fopen(xmliconpath, "wb");
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
@ -2592,25 +2601,58 @@ int ProgressUpdateWindow() {
updateLanguageFiles();
}
}
} else if(choice == 3) {
char wiitdbpath[150];
msgTxt.SetTextf("%s", tr("Updating WiiTDB.zip"));
struct block file = downloadfile(XMLurl);
if (file.data != NULL) {
sprintf(wiitdbpath, "%swiitdb.zip", Settings.titlestxt_path);
FILE *pfile = fopen(wiitdbpath, "wb");
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
free(file.data);
}
} else {
failed = -1;
}
} else {
ret = -1;
}
} else {
WindowPrompt(tr("No new updates."), 0, tr("OK"));
ret = -1;
}
} else if(updatemode == 2) {
char wiitdbpath[200];
msgTxt.SetTextf("%s", tr("Updating WiiTDB.zip"));
struct block file = downloadfile(XMLurl);
if (file.data != NULL) {
snprintf(wiitdbpath, sizeof(wiitdbpath), "%swiitdb.zip", Settings.titlestxt_path);
subfoldercreate(wiitdbpath);
FILE *pfile = fopen(wiitdbpath, "wb");
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
free(file.data);
}
ret = 1;
} else if(updatemode == 3) {
msgTxt.SetTextf("%s", tr("Updating Language Files:"));
updateLanguageFiles();
} else {
ret = -1;
ret = 1;
}
}
CloseConnection();
if (!failed && ret >= 0) {
if (!failed && ret >= 0 && updatemode == 1) {
WindowPrompt(tr("Successfully Updated") , tr("Restarting..."), tr("OK"));
Sys_BackToLoader();
} else if(updatemode > 0 && ret > 0) {
WindowPrompt(tr("Successfully Updated") , 0, tr("OK"));
}
promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
@ -3040,8 +3082,8 @@ int CodeDownload(const char *id) {
goto exit;
}
if (file.data != NULL) {
if (file.data != NULL) {
FILE * pfile;
pfile = fopen(txtpath, "wb");
fwrite(file.data,1,file.size,pfile);

View File

@ -42,12 +42,9 @@ void __Disc_SetLowMem(void) {
memset(gameid, 0, 8);
memcpy(gameid, (char*)Disc_ID, 6);
if ((strcmp(gameid,"R3XE6U")==0)||
(strcmp(gameid,"R3XP6V")==0))/*&&
(IOS_GetVersion()==249)&&
((IOS_GetRevision()==10)||(IOS_GetRevision()==13)) I left out the ios check to see if works with other ios versions.*/
if ((strcmp(gameid,"R3XE6U")==0) || (strcmp(gameid,"R3XP6V")==0))
{
*GameID_Address = Disc_ID; // Game ID Address
*GameID_Address = 0x80000000; // Game ID Address
}
/* Copy disc ID */