Made game ID text into a button to change the ID for custom games based off a retail disc (Guitar Hero baby!).

*NOTE*
it is possible to change any game ID to more or less than 6 characters, but since most of the functions use header->id[0] through [5], more will be useless and less may result in code dumps.

it is not advised to change the ID for games that are not custom, as the cover and wiitdb data will not be available for made up ID

it is possible to have multiple games with the same ID on the wbfs partition, but when any of them are clicked, the wii will perform the selected action (play, delete, etc) on the first one it finds.
This commit is contained in:
giantpune 2009-09-02 08:03:51 +00:00
parent bbbbde4b36
commit 1fe96748b7
26 changed files with 305 additions and 178 deletions

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: David Jelinek (djelinek@hotmail.com) \n" "Last-Translator: David Jelinek (djelinek@hotmail.com) \n"
"Language-Team: r713 - last version on http://djelinek.sweb.cz/czech.lang \n" "Language-Team: r713 - last version on http://djelinek.sweb.cz/czech.lang \n"
@ -205,6 +205,9 @@ msgstr "Zjištuji dostupné aktualiazce"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Kliknete pro stažení obalu" msgstr "Kliknete pro stažení obalu"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Hodiny" msgstr "Hodiny"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Leder efter opdateringer"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Klik for at downloade covers" msgstr "Klik for at downloade covers"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Ur" msgstr "Ur"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: tj_cool\n" "Last-Translator: tj_cool\n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Controleren op updates"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Klik om hoesjes te downloaden" msgstr "Klik om hoesjes te downloaden"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Klok" msgstr "Klok"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr ""
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "" msgstr ""
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "" msgstr ""

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr ""
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Klikkaa ladataksesi kansia" msgstr "Klikkaa ladataksesi kansia"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Kello" msgstr "Kello"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: Kin8\n" "Last-Translator: Kin8\n"
"Language-Team: Badablek, Amour, ikya, OuahOuah, dj_skual & Kin8\n" "Language-Team: Badablek, Amour, ikya, OuahOuah, dj_skual & Kin8\n"
@ -205,6 +205,9 @@ msgstr "Recherche de Mise à Jour"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Téléchargement des jaquettes" msgstr "Téléchargement des jaquettes"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Horloge" msgstr "Horloge"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Suche nach Aktualisierung"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Klicken zum Coverdownloaden" msgstr "Klicken zum Coverdownloaden"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Uhr" msgstr "Uhr"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: Tusk\n" "Last-Translator: Tusk\n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Frissitések Keresése"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Kattints, hogy letöltsd a borítókat" msgstr "Kattints, hogy letöltsd a borítókat"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Óra" msgstr "Óra"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-08-05 10:00+0200\n" "PO-Revision-Date: 2009-08-05 10:00+0200\n"
"Last-Translator: Cambo \n" "Last-Translator: Cambo \n"
"Language-Team: FoxeJoe & Cambo\n" "Language-Team: FoxeJoe & Cambo\n"
@ -205,6 +205,9 @@ msgstr "Verifica Aggiornamenti"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Premi per scaricare le Copertine" msgstr "Premi per scaricare le Copertine"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Orologio" msgstr "Orologio"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "最新版を確認中"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "クリックでカバーをダウンロード" msgstr "クリックでカバーをダウンロード"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "時計" msgstr "時計"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr ""
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "표지를 다운하려면 클릭하세요" msgstr "표지를 다운하려면 클릭하세요"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "시계" msgstr "시계"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Søker etter oppdateringer"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Klikk for å laste ned cover" msgstr "Klikk for å laste ned cover"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Klokke" msgstr "Klokke"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: ziom666 (zadania_prog@vp.pl)\n" "Last-Translator: ziom666 (zadania_prog@vp.pl)\n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Sprawdzanie aktualizacji"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Kliknij aby pobrac okladki" msgstr "Kliknij aby pobrac okladki"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Zegar" msgstr "Zegar"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-08-11 19:45\n" "PO-Revision-Date: 2009-08-11 19:45\n"
"Last-Translator: boto12\n" "Last-Translator: boto12\n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Procurando Atualizações"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Aperte para baixar capas" msgstr "Aperte para baixar capas"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Relógio" msgstr "Relógio"
@ -1169,4 +1172,3 @@ msgstr "de"
msgid "seconds left" msgid "seconds left"
msgstr "segundos restantes" msgstr "segundos restantes"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-08-11 12:25\n" "PO-Revision-Date: 2009-08-11 12:25\n"
"Last-Translator: Sky8000\n" "Last-Translator: Sky8000\n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Procurando Actualizações"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Carregue para descarregar capas" msgstr "Carregue para descarregar capas"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Relógio" msgstr "Relógio"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: Kir\n" "Last-Translator: Kir\n"
"Language-Team: Kir\n" "Language-Team: Kir\n"
@ -205,6 +205,9 @@ msgstr "Проверяю обновления"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Нажми, чтобы скачать обложки" msgstr "Нажми, чтобы скачать обложки"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Часы" msgstr "Часы"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr ""
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "点击下载封面" msgstr "点击下载封面"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "时钟" msgstr "时钟"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "Verificando Actualizaciones"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Click para bajar Carátulas" msgstr "Click para bajar Carátulas"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Reloj" msgstr "Reloj"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-08-02 12:20+0200\n" "PO-Revision-Date: 2009-08-02 12:20+0200\n"
"Last-Translator: Katsurou\n" "Last-Translator: Katsurou\n"
"Language-Team: Katsurou, pirateX\n" "Language-Team: Katsurou, pirateX\n"
@ -205,6 +205,9 @@ msgstr "Letar efter uppdateringar"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Klicka för att ladda ner omslag" msgstr "Klicka för att ladda ner omslag"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Klocka" msgstr "Klocka"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 17:05+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr "正在檢查更新"
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "點擊進行封面下載" msgstr "點擊進行封面下載"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "時鐘" msgstr "時鐘"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: USB Loader GX\n" "Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-21 04:07+0200\n" "POT-Creation-Date: 2009-09-02 02:36-0400\n"
"PO-Revision-Date: 2009-07-18 15:18+0200\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -205,6 +205,9 @@ msgstr ""
msgid "Click to Download Covers" msgid "Click to Download Covers"
msgstr "Kapaklari Indirmek için Tiklayin" msgstr "Kapaklari Indirmek için Tiklayin"
msgid "Click to change game ID"
msgstr ""
msgid "Clock" msgid "Clock"
msgstr "Saat" msgstr "Saat"

File diff suppressed because one or more lines are too long

View File

@ -525,6 +525,22 @@ u32 wbfs_ren_disc(wbfs_t*p, u8* discid, u8* newname)
return 0; return 0;
} }
u32 wbfs_rID_disc(wbfs_t*p, u8* discid, u8* newID)
{
wbfs_disc_t *d = wbfs_open_disc(p,discid);
int disc_info_sz_lba = p->disc_info_sz>>p->hd_sec_sz_s;
if(!d)
return 1;
memset(d->header->disc_header_copy, 0, 0x10);
strncpy((char *) d->header->disc_header_copy, (char *) newID, 0x9);
p->write_hdsector(p->callback_data,p->part_lba+1+d->i*disc_info_sz_lba,disc_info_sz_lba,d->header);
wbfs_close_disc(d);
return 0;
}
// trim the file-system to its minimum size // trim the file-system to its minimum size
u32 wbfs_trim(wbfs_t*p); u32 wbfs_trim(wbfs_t*p);

View File

@ -593,13 +593,30 @@ int MenuDiscList() {
DownloadBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP); DownloadBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
DownloadBtn.SetPosition(THEME.cover_x,THEME.cover_y); DownloadBtn.SetPosition(THEME.cover_x,THEME.cover_y);
GuiTooltip IDBtnTT(tr("Click to change game ID"));
if (Settings.wsprompt == yes)
IDBtnTT.SetWidescreen(CFG.widescreen);
IDBtnTT.SetAlpha(THEME.tooltipAlpha);
GuiButton idBtn(0,0);
idBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
idBtn.SetPosition(THEME.id_x,THEME.id_y);
if (Settings.godmode == 1) {//only make the button have trigger & tooltip if in godmode if (Settings.godmode == 1) {//only make the button have trigger & tooltip if in godmode
DownloadBtn.SetSoundOver(&btnSoundOver); DownloadBtn.SetSoundOver(&btnSoundOver);
DownloadBtn.SetTrigger(&trigA); DownloadBtn.SetTrigger(&trigA);
DownloadBtn.SetTrigger(&trig1); DownloadBtn.SetTrigger(&trig1);
DownloadBtn.SetToolTip(&DownloadBtnTT,205,-30); DownloadBtn.SetToolTip(&DownloadBtnTT,205,-30);
idBtn.SetSoundOver(&btnSoundOver);
idBtn.SetTrigger(&trigA);
idBtn.SetToolTip(&IDBtnTT,205,-30);
} else } else
{
DownloadBtn.SetRumble(false); DownloadBtn.SetRumble(false);
idBtn.SetRumble(false);
}
GuiGameBrowser * gameBrowser = NULL; GuiGameBrowser * gameBrowser = NULL;
GuiGameGrid * gameGrid = NULL; GuiGameGrid * gameGrid = NULL;
@ -645,6 +662,7 @@ int MenuDiscList() {
w.Append(&homeBtn); w.Append(&homeBtn);
w.Append(&settingsBtn); w.Append(&settingsBtn);
w.Append(&DownloadBtn); w.Append(&DownloadBtn);
w.Append(&idBtn);
w.Append(&favoriteBtn); w.Append(&favoriteBtn);
w.Append(&abcBtn); w.Append(&abcBtn);
w.Append(&countBtn); w.Append(&countBtn);
@ -1014,7 +1032,6 @@ int MenuDiscList() {
if (choice==2) if (choice==2)
homeBtn.SetState(STATE_CLICKED); homeBtn.SetState(STATE_CLICKED);
} }
if (Settings.gameDisplay==grid) { if (Settings.gameDisplay==grid) {
int selectimg; int selectimg;
DownloadBtn.SetSize(0,0); DownloadBtn.SetSize(0,0);
@ -1034,6 +1051,7 @@ int MenuDiscList() {
//Get selected game under cursor //Get selected game under cursor
int selectimg; int selectimg;
DownloadBtn.SetSize(160,224); DownloadBtn.SetSize(160,224);
idBtn.SetSize(100,40);
selectimg = gameBrowser->GetSelectedOption(); selectimg = gameBrowser->GetSelectedOption();
gameSelected = gameBrowser->GetClickedOption(); gameSelected = gameBrowser->GetClickedOption();
@ -1051,7 +1069,7 @@ int MenuDiscList() {
w.Remove(&DownloadBtn); w.Remove(&DownloadBtn);
if (GameIDTxt) { if (GameIDTxt) {
w.Remove(GameIDTxt); w.Remove(&idBtn);
delete GameIDTxt; delete GameIDTxt;
GameIDTxt = NULL; GameIDTxt = NULL;
} }
@ -1120,9 +1138,10 @@ int MenuDiscList() {
if ((Settings.sinfo == GameID) || (Settings.sinfo == Both)) { if ((Settings.sinfo == GameID) || (Settings.sinfo == Both)) {
GameIDTxt = new GuiText(IDfull, 22, (GXColor) {THEME.info_r, THEME.info_g, THEME.info_b, 255}); GameIDTxt = new GuiText(IDfull, 22, (GXColor) {THEME.info_r, THEME.info_g, THEME.info_b, 255});
GameIDTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); GameIDTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
GameIDTxt->SetPosition(THEME.id_x,THEME.id_y); //GameIDTxt->SetPosition(THEME.id_x,THEME.id_y);
GameIDTxt->SetEffect(EFFECT_FADE, 20); idBtn.SetEffect(EFFECT_FADE, 20);
w.Append(GameIDTxt); idBtn.SetLabel(GameIDTxt);
w.Append(&idBtn);
} }
if ((Settings.sinfo == GameRegion) || (Settings.sinfo == Both)) { if ((Settings.sinfo == GameRegion) || (Settings.sinfo == Both)) {
@ -1134,6 +1153,22 @@ int MenuDiscList() {
} }
} }
} }
if (idBtn.GetState() == STATE_CLICKED) {
struct discHdr * header = &gameList[gameBrowser->GetSelectedOption()];
//enter new game ID
char entered[10];
snprintf(entered, sizeof(entered), "%s", IDfull);
//entered[9] = '\0';
int result = OnScreenKeyboard(entered, 7,0);
if (result == 1) {
WBFS_ReIDGame(header->id, entered);
//__Menu_GetEntries();
menu = MENU_DISCLIST;
}
idBtn.ResetState();
}
} }
if ((gameSelected >= 0) && (gameSelected < (s32)gameCnt)) { if ((gameSelected >= 0) && (gameSelected < (s32)gameCnt)) {

View File

@ -476,6 +476,19 @@ s32 WBFS_RenameGame(u8 *discid, const void *newname) {
return 0; return 0;
} }
s32 WBFS_ReIDGame(u8 *discid, const void *newID) {
s32 ret;
/* No USB device open */
if (!hdd)
return -1;
ret = wbfs_rID_disc(hdd, discid,(u8*)newID);
if (ret < 0)
return ret;
return 0;
}
f32 WBFS_EstimeGameSize(void) { f32 WBFS_EstimeGameSize(void) {
return wbfs_estimate_disc(hdd, __WBFS_ReadDVD, NULL, ONLY_GAME_PARTITION); return wbfs_estimate_disc(hdd, __WBFS_ReadDVD, NULL, ONLY_GAME_PARTITION);

View File

@ -32,6 +32,7 @@ extern "C" {
s32 WBFS_GameSize(u8 *, f32 *); s32 WBFS_GameSize(u8 *, f32 *);
s32 WBFS_DiskSpace(f32 *, f32 *); s32 WBFS_DiskSpace(f32 *, f32 *);
s32 WBFS_RenameGame(u8 *, const void *); s32 WBFS_RenameGame(u8 *, const void *);
s32 WBFS_ReIDGame(u8 *discid, const void *newID);
f32 WBFS_EstimeGameSize(void); f32 WBFS_EstimeGameSize(void);
s32 __WBFS_ReadUSB(void *fp, u32 lba, u32 count, void *iobuf); s32 __WBFS_ReadUSB(void *fp, u32 lba, u32 count, void *iobuf);