From 80c580edb735db35dd082f33e1a46df37131e216 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Sun, 9 Aug 2009 08:07:27 +0000 Subject: [PATCH] *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() --- Languages/czech.lang | 8 ++++- Languages/danish.lang | 8 ++++- Languages/dutch.lang | 8 ++++- Languages/english.lang | 8 ++++- Languages/finnish.lang | 8 ++++- Languages/french.lang | 8 ++++- Languages/german.lang | 8 ++++- Languages/hungarian.lang | 8 ++++- Languages/italian.lang | 8 ++++- Languages/japanese.lang | 8 ++++- Languages/korean.lang | 8 ++++- Languages/norwegian.lang | 8 ++++- Languages/polish.lang | 8 ++++- Languages/portuguese_br.lang | 8 ++++- Languages/portuguese_pt.lang | 8 ++++- Languages/russian.lang | 8 ++++- Languages/schinese.lang | 8 ++++- Languages/spanish.lang | 8 ++++- Languages/swedish.lang | 8 ++++- Languages/tchinese.lang | 8 ++++- Languages/turkish.lang | 8 ++++- source/language/UpdateLanguage.cpp | 18 ++++++---- source/language/UpdateLanguage.h | 2 +- source/prompts/PromptWindows.cpp | 58 +++++++++++++++++++++++++----- source/usbloader/disc.c | 7 ++-- 25 files changed, 211 insertions(+), 42 deletions(-) diff --git a/Languages/czech.lang b/Languages/czech.lang index ea004885..e1266852 100644 --- a/Languages/czech.lang +++ b/Languages/czech.lang @@ -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" diff --git a/Languages/danish.lang b/Languages/danish.lang index 5fae89f5..22d18cf9 100644 --- a/Languages/danish.lang +++ b/Languages/danish.lang @@ -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" diff --git a/Languages/dutch.lang b/Languages/dutch.lang index fc6791dd..c8ab58c5 100644 --- a/Languages/dutch.lang +++ b/Languages/dutch.lang @@ -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" diff --git a/Languages/english.lang b/Languages/english.lang index 34390a77..9aafc681 100644 --- a/Languages/english.lang +++ b/Languages/english.lang @@ -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 "" diff --git a/Languages/finnish.lang b/Languages/finnish.lang index c2072ecb..baf9a662 100644 --- a/Languages/finnish.lang +++ b/Languages/finnish.lang @@ -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 "" diff --git a/Languages/french.lang b/Languages/french.lang index 5aa52bbb..d6630b84 100644 --- a/Languages/french.lang +++ b/Languages/french.lang @@ -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" diff --git a/Languages/german.lang b/Languages/german.lang index 7c43c4a7..3da6d4cf 100644 --- a/Languages/german.lang +++ b/Languages/german.lang @@ -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" diff --git a/Languages/hungarian.lang b/Languages/hungarian.lang index 3bcf0da0..e1c24908 100644 --- a/Languages/hungarian.lang +++ b/Languages/hungarian.lang @@ -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" diff --git a/Languages/italian.lang b/Languages/italian.lang index ac7083ca..3790082f 100644 --- a/Languages/italian.lang +++ b/Languages/italian.lang @@ -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" diff --git a/Languages/japanese.lang b/Languages/japanese.lang index deb88245..9282cf10 100644 --- a/Languages/japanese.lang +++ b/Languages/japanese.lang @@ -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機能" diff --git a/Languages/korean.lang b/Languages/korean.lang index f9105f3a..f78a8177 100644 --- a/Languages/korean.lang +++ b/Languages/korean.lang @@ -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 "" diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang index 75fce4f0..eae1cb8e 100644 --- a/Languages/norwegian.lang +++ b/Languages/norwegian.lang @@ -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" diff --git a/Languages/polish.lang b/Languages/polish.lang index a45361bc..d1d38afe 100644 --- a/Languages/polish.lang +++ b/Languages/polish.lang @@ -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" diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang index 41b9b57a..f3bcc32e 100644 --- a/Languages/portuguese_br.lang +++ b/Languages/portuguese_br.lang @@ -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" diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang index 83f995a3..dddf0714 100644 --- a/Languages/portuguese_pt.lang +++ b/Languages/portuguese_pt.lang @@ -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" diff --git a/Languages/russian.lang b/Languages/russian.lang index 2518e9ea..e856c0e5 100644 --- a/Languages/russian.lang +++ b/Languages/russian.lang @@ -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" diff --git a/Languages/schinese.lang b/Languages/schinese.lang index d939a6cd..21baceb4 100644 --- a/Languages/schinese.lang +++ b/Languages/schinese.lang @@ -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 "" diff --git a/Languages/spanish.lang b/Languages/spanish.lang index 2f6829b2..11e68d5e 100644 --- a/Languages/spanish.lang +++ b/Languages/spanish.lang @@ -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" diff --git a/Languages/swedish.lang b/Languages/swedish.lang index f479bde8..b54b85ed 100644 --- a/Languages/swedish.lang +++ b/Languages/swedish.lang @@ -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" diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang index 19cab41a..54df5525 100644 --- a/Languages/tchinese.lang +++ b/Languages/tchinese.lang @@ -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功能設定" diff --git a/Languages/turkish.lang b/Languages/turkish.lang index fd3dc4bc..8279cf3c 100644 --- a/Languages/turkish.lang +++ b/Languages/turkish.lang @@ -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 "" diff --git a/source/language/UpdateLanguage.cpp b/source/language/UpdateLanguage.cpp index 8f322836..cbe28da7 100644 --- a/source/language/UpdateLanguage.cpp +++ b/source/language/UpdateLanguage.cpp @@ -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 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); diff --git a/source/usbloader/disc.c b/source/usbloader/disc.c index 6ca83497..2edfbf20 100644 --- a/source/usbloader/disc.c +++ b/source/usbloader/disc.c @@ -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 */