From 83f5dc29de603992e64ba105fbb4610d94016a45 Mon Sep 17 00:00:00 2001 From: giantpune Date: Mon, 20 Jul 2009 07:23:30 +0000 Subject: [PATCH] add filesize function to get size of dols. change homebrew icon image and move it a bit. hide the homebrew button if godmode!=1 maybe fix issue 722. i don't have a spare drive to test it. fix grammatical error in the settings. fix long game name overflow on the gameinfo screen switch the homebrew buttons to use the new HBCwindowprompt(). none of the meta.xml data is passed yet so the prompt looks pretty naked. --- 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/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 +-- gui.pnproj | 2 +- source/filelist.h | 3 ++ source/homebrewboot/HomebrewBrowse.cpp | 75 ++++++++++++++++++++------ source/listfiles.c | 19 +++++++ source/listfiles.h | 1 + source/menu.cpp | 37 ++++++++++--- source/prompts/PromptWindows.cpp | 32 +++++++++-- source/prompts/PromptWindows.h | 2 +- source/prompts/gameinfo.cpp | 1 + source/settings/Settings.cpp | 2 +- 30 files changed, 225 insertions(+), 109 deletions(-) diff --git a/Languages/czech.lang b/Languages/czech.lang index bb651a14..ffaa45de 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: David Jelinek (djelinek@hotmail.com) \n" "Language-Team: Last version on http://startgolf.tym.cz/czech.lang \n" @@ -198,6 +198,9 @@ msgstr "Stažení obalu" msgid "Cover Path" msgstr "Cesta k obalum" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Cesta k obalum zmenena" @@ -258,9 +261,6 @@ msgstr "Zobrazení" msgid "Do you really want to delete:" msgstr "Opravdu smazat:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Prejete si zmenit jazyk?" diff --git a/Languages/danish.lang b/Languages/danish.lang index 5ef53ffe..034b16cc 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Cover-download" msgid "Cover Path" msgstr "Sti til covers" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Sti til Covers ændret" @@ -258,9 +261,6 @@ msgstr "Spilinfo." msgid "Do you really want to delete:" msgstr "Vil du slette:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Vil du ændre sprog?" diff --git a/Languages/dutch.lang b/Languages/dutch.lang index 9514d8f8..823813e4 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Download hoesjes" msgid "Cover Path" msgstr "Locatie hoesjes" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Locatie hoesjes gewijzigd" @@ -258,9 +261,6 @@ msgstr "Tonen" msgid "Do you really want to delete:" msgstr "Wil je echt verwijderen:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Wil je de taal wijzigen?" diff --git a/Languages/english.lang b/Languages/english.lang index 919c4ea2..b2a348b9 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "" msgid "Cover Path" msgstr "" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "" @@ -258,9 +261,6 @@ msgstr "" msgid "Do you really want to delete:" msgstr "" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "" diff --git a/Languages/finnish.lang b/Languages/finnish.lang index 09b6f5cb..67d8fcf6 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "kansien lataus" msgid "Cover Path" msgstr "kansien sijainti" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "kansien sijainti muutettu" @@ -258,9 +261,6 @@ msgstr "Näyttö" msgid "Do you really want to delete:" msgstr "Haluatko varmasti formatoida:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "" diff --git a/Languages/french.lang b/Languages/french.lang index 0776d268..a81baf1a 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: Kin8\n" "Language-Team: Badablek, Amour, ikya, OuahOuah & Kin8\n" @@ -198,6 +198,9 @@ msgstr "Téléchargement Jaquettes" msgid "Cover Path" msgstr "Dossier Jaquettes" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Dossier des jaquettes modifié" @@ -258,9 +261,6 @@ msgstr "Affichage" msgid "Do you really want to delete:" msgstr "Voulez-vous vraiment supprimer ?" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Changer de langue ?" diff --git a/Languages/german.lang b/Languages/german.lang index b7fdd612..a31392fd 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Cover Download" msgid "Cover Path" msgstr "Cover Pfad" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Cover Pfad geändert" @@ -258,9 +261,6 @@ msgstr "Anzeige" msgid "Do you really want to delete:" msgstr "Löschvorgang bestätigen:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Möchten Sie die Sprache ändern?" diff --git a/Languages/hungarian.lang b/Languages/hungarian.lang index a01b8dd0..dc2e0560 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: Tusk\n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Boritó Letöltés" msgid "Cover Path" msgstr "Boritó Útvonala" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Boritó Útvonala megváltozott" @@ -258,9 +261,6 @@ msgstr "Kijelzõ" msgid "Do you really want to delete:" msgstr "Biztosan ki akarod törölni?:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Megakarod változtatni a nyevet?" diff --git a/Languages/italian.lang b/Languages/italian.lang index 5838c342..eb5fc456 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 23:50+0200\n" "Last-Translator: Cambo \n" "Language-Team: FoxeJoe & Cambo\n" @@ -198,6 +198,9 @@ msgstr "Scaricamento Copertina" msgid "Cover Path" msgstr "Percorso Copertine" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Percorso Copertine Modificato" @@ -258,9 +261,6 @@ msgstr "Display" msgid "Do you really want to delete:" msgstr "Vuoi veramente Eliminare:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Vuoi cambiare lingua?" diff --git a/Languages/japanese.lang b/Languages/japanese.lang index 4e3517e7..9659da1b 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "カバー ダウンロード" msgid "Cover Path" msgstr "カバーパス" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "カバーパスを変更しました" @@ -258,9 +261,6 @@ msgstr "ディスプレイ" msgid "Do you really want to delete:" msgstr "削除しますか:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "言語設定を変更しますか?" diff --git a/Languages/korean.lang b/Languages/korean.lang index 57c471f8..7abde67d 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "표지 다운로드" msgid "Cover Path" msgstr "표지 경로" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "표지 경로 변경됨" @@ -258,9 +261,6 @@ msgstr "화면 표시" msgid "Do you really want to delete:" msgstr "정말로 삭제하겠습니까:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "" diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang index bb63cff5..b6711751 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Cover nedlasting" msgid "Cover Path" msgstr "Cover sti" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Cover sti endret" @@ -258,9 +261,6 @@ msgstr "Vis" msgid "Do you really want to delete:" msgstr "Er du sikker på at du vil slette:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Vil du endre språk?" diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang index 3d1441b0..9a1ddd3c 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Baixar Capas" msgid "Cover Path" msgstr "Local Capas" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Local Capas alterado" @@ -258,9 +261,6 @@ msgstr "Exibir" msgid "Do you really want to delete:" msgstr "Quer realmente apagar:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Você deseja alterar o idioma?" diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang index 96935006..26476f72 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: Sky8000\n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Download de Capas" msgid "Cover Path" msgstr "Pasta Capas" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Pasta das Capas alterada" @@ -258,9 +261,6 @@ msgstr "Mostrar" msgid "Do you really want to delete:" msgstr "Quer mesmo REMOVER o jogo:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Deseja alterar o idioma?" diff --git a/Languages/russian.lang b/Languages/russian.lang index 2bdd98dd..f7d0c96f 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: Kir\n" "Language-Team: Kir\n" @@ -198,6 +198,9 @@ msgstr "Скачать обложку" msgid "Cover Path" msgstr "Путь к обложкам" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Путь к обложкам был изменен." @@ -258,9 +261,6 @@ msgstr "Отображать" msgid "Do you really want to delete:" msgstr "Вы хотите удалить:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Вы хотите сменить язык ?" diff --git a/Languages/schinese.lang b/Languages/schinese.lang index db6d5137..b9d2f0e8 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "下载封面" msgid "Cover Path" msgstr "封面存放路径" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "封面路径已变更" @@ -258,9 +261,6 @@ msgstr "显示" msgid "Do you really want to delete:" msgstr "确定删除:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "" diff --git a/Languages/spanish.lang b/Languages/spanish.lang index 438b3c42..c5671e35 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Descarga de Carátulas" msgid "Cover Path" msgstr "Ruta Carátulas" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Ruta de Carátulas cambiada" @@ -258,9 +261,6 @@ msgstr "Mostrar" msgid "Do you really want to delete:" msgstr "¿Realmente quieres borrar?:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "¿Quieres cambiar idioma?" diff --git a/Languages/swedish.lang b/Languages/swedish.lang index 2e2852ab..0e94ad09 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: Katsurou\n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Omslagsnedladdning" msgid "Cover Path" msgstr "Omslagsmapp" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Omslagsmapp ändrad" @@ -258,9 +261,6 @@ msgstr "Visning" msgid "Do you really want to delete:" msgstr "Vill du verkligen radera:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "Vill du byta språk?" diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang index 9c8aaa57..38a19392 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "下載封面" msgid "Cover Path" msgstr "封面路徑" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "封面路徑已變更" @@ -258,9 +261,6 @@ msgstr "顯示" msgid "Do you really want to delete:" msgstr "確定刪除:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "變更語言?" diff --git a/Languages/turkish.lang b/Languages/turkish.lang index e581f9ce..2cb7ed9b 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-07-19 19:46+0200\n" +"POT-Creation-Date: 2009-07-20 03:09-0400\n" "PO-Revision-Date: 2009-07-18 15:18+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -198,6 +198,9 @@ msgstr "Kapak Indirme" msgid "Cover Path" msgstr "Kapak Yolu" +msgid "Coverpath Change" +msgstr "" + msgid "Coverpath Changed" msgstr "Kapak Yolu Degistir" @@ -258,9 +261,6 @@ msgstr "Görüntü" msgid "Do you really want to delete:" msgstr "Gerçekten silmek istiyor musunuz:" -msgid "Do you want to boot?" -msgstr "" - msgid "Do you want to change language?" msgstr "" diff --git a/gui.pnproj b/gui.pnproj index 3657ef87..23a83484 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/filelist.h b/source/filelist.h index a72212fd..761a8efc 100644 --- a/source/filelist.h +++ b/source/filelist.h @@ -101,6 +101,9 @@ extern const u32 bg_options_settings_png_size; extern const u8 settings_background_png[]; extern const u32 settings_background_png_size; +extern const u8 browser_png[]; +extern const u32 browser_png_size; + extern const u8 nocover_png[]; extern const u32 nocover_png_size; diff --git a/source/homebrewboot/HomebrewBrowse.cpp b/source/homebrewboot/HomebrewBrowse.cpp index aae64736..2d3f3146 100644 --- a/source/homebrewboot/HomebrewBrowse.cpp +++ b/source/homebrewboot/HomebrewBrowse.cpp @@ -16,6 +16,7 @@ #include "menu.h" #include "filelist.h" #include "sys.h" +#include "listfiles.h" /*** Extern functions ***/ extern void ResumeGui(); @@ -417,11 +418,22 @@ int MenuHomebrewBrowse() if(MainButton1.GetState() == STATE_CLICKED) { char temp[200]; - char * shortpath = NULL; - snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset)), "%s", HomebrewFiles.GetFilepath(fileoffset)); + char iconpath[200]; + char * shortpath = NULL; + + //write iconpath + snprintf(iconpath, sizeof(iconpath), "%sicon.png", HomebrewFiles.GetFilepath(fileoffset)); + + //get filesize + snprintf(temp, sizeof(temp), "%s%s", HomebrewFiles.GetFilepath(fileoffset),HomebrewFiles.GetFilename(fileoffset)); + u64 filesize = FileSize(temp); + + //write short filename + snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset)), "%s", HomebrewFiles.GetFilepath(fileoffset)); shortpath = strrchr(temp, '/'); snprintf(temp, sizeof(temp), "%s/%s", shortpath, HomebrewFiles.GetFilename(fileoffset)); - int choice = WindowPrompt(tr("Do you want to boot?"), temp, tr("Yes"), tr("No")); + + int choice = HBCWindowPrompt(temp, 0, 0,0, 0, iconpath, filesize); if(choice == 1) { boothomebrew = true; menu = MENU_EXIT; @@ -432,11 +444,22 @@ int MenuHomebrewBrowse() } else if(MainButton2.GetState() == STATE_CLICKED) { char temp[200]; - char * shortpath = NULL; - snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset+1)), "%s", HomebrewFiles.GetFilepath(fileoffset+1)); + char iconpath[200]; + char * shortpath = NULL; + + //write iconpath + snprintf(iconpath, sizeof(iconpath), "%sicon.png", HomebrewFiles.GetFilepath(fileoffset+1)); + + //get filesize + snprintf(temp, sizeof(temp), "%s%s", HomebrewFiles.GetFilepath(fileoffset+1),HomebrewFiles.GetFilename(fileoffset+1)); + u64 filesize = FileSize(temp); + + //write short filename + snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset+1)), "%s", HomebrewFiles.GetFilepath(fileoffset+1)); shortpath = strrchr(temp, '/'); snprintf(temp, sizeof(temp), "%s/%s", shortpath, HomebrewFiles.GetFilename(fileoffset+1)); - int choice = WindowPrompt(tr("Do you want to boot?"), temp, tr("Yes"), tr("No")); + + int choice = HBCWindowPrompt(temp, 0, 0,0, 0, iconpath, filesize); if(choice == 1) { boothomebrew = true; menu = MENU_EXIT; @@ -446,13 +469,24 @@ int MenuHomebrewBrowse() MainButton2.ResetState(); } else if(MainButton3.GetState() == STATE_CLICKED) { - char temp[200]; - char * shortpath = NULL; - snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset+2)), "%s", HomebrewFiles.GetFilepath(fileoffset+2)); + char temp[200]; + char iconpath[200]; + char * shortpath = NULL; + + //write iconpath + snprintf(iconpath, sizeof(iconpath), "%sicon.png", HomebrewFiles.GetFilepath(fileoffset+2)); + + //get filesize + snprintf(temp, sizeof(temp), "%s%s", HomebrewFiles.GetFilepath(fileoffset+2),HomebrewFiles.GetFilename(fileoffset+2)); + u64 filesize = FileSize(temp); + + //write short filename + snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset+2)), "%s", HomebrewFiles.GetFilepath(fileoffset+2)); shortpath = strrchr(temp, '/'); snprintf(temp, sizeof(temp), "%s/%s", shortpath, HomebrewFiles.GetFilename(fileoffset+2)); - int choice = WindowPrompt(tr("Do you want to boot?"), temp, tr("Yes"), tr("No")); - if(choice == 1) { + + int choice = HBCWindowPrompt(temp, 0, 0,0, 0, iconpath, filesize); + if(choice == 1) { boothomebrew = true; menu = MENU_EXIT; snprintf(Settings.selected_homebrew, sizeof(Settings.selected_homebrew), "%s%s", HomebrewFiles.GetFilepath(fileoffset+2), HomebrewFiles.GetFilename(fileoffset+2)); @@ -461,12 +495,23 @@ int MenuHomebrewBrowse() MainButton3.ResetState(); } else if(MainButton4.GetState() == STATE_CLICKED) { - char temp[200]; - char * shortpath = NULL; - snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset+3)), "%s", HomebrewFiles.GetFilepath(fileoffset+3)); + char temp[200]; + char iconpath[200]; + char * shortpath = NULL; + + //write iconpath + snprintf(iconpath, sizeof(iconpath), "%sicon.png", HomebrewFiles.GetFilepath(fileoffset+3)); + + //get filesize + snprintf(temp, sizeof(temp), "%s%s", HomebrewFiles.GetFilepath(fileoffset+3),HomebrewFiles.GetFilename(fileoffset+3)); + u64 filesize = FileSize(temp); + + //write short filename + snprintf(temp, strlen(HomebrewFiles.GetFilepath(fileoffset+3)), "%s", HomebrewFiles.GetFilepath(fileoffset+3)); shortpath = strrchr(temp, '/'); snprintf(temp, sizeof(temp), "%s/%s", shortpath, HomebrewFiles.GetFilename(fileoffset+3)); - int choice = WindowPrompt(tr("Do you want to boot?"), temp, tr("Yes"), tr("No")); + + int choice = HBCWindowPrompt(temp, 0, 0,0, 0, iconpath, filesize); if(choice == 1) { boothomebrew = true; menu = MENU_EXIT; diff --git a/source/listfiles.c b/source/listfiles.c index a619d98a..a49bd3d1 100644 --- a/source/listfiles.c +++ b/source/listfiles.c @@ -103,3 +103,22 @@ bool checkfile(char * path) } return false; } + +/**************************************************************************** + * FileSize + * + * Get filesize in bytes. u64 for files bigger than 4GB + ***************************************************************************/ +u64 FileSize(const char * filepath) +{ + struct stat filestat; + + if (stat(filepath, &filestat) != 0) + return 0; + + return filestat.st_size; +} + + + + diff --git a/source/listfiles.h b/source/listfiles.h index ea41ee86..9d26faa0 100644 --- a/source/listfiles.h +++ b/source/listfiles.h @@ -11,6 +11,7 @@ char * GetFileName(int i); int GetAllDirFiles(char * filespath); bool subfoldercreate(char * fullpath); bool checkfile(char * path); +u64 FileSize(const char * filepath); #ifdef __cplusplus } diff --git a/source/menu.cpp b/source/menu.cpp index 9f7966de..1020e8d3 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -339,6 +339,10 @@ HBCWindowPrompt(db1, db2, db3,db4, db5, db7, db6); GuiImageData imgarrangeCarousel(imgPath, arrangeCarousel_png); snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel_gray.png", CFG.theme_path); GuiImageData imgarrangeCarousel_gray(imgPath, arrangeCarousel_gray_png); + snprintf(imgPath, sizeof(imgPath), "%sbrowser.png", CFG.theme_path); + GuiImageData homebrewImgData(imgPath, browser_png); + + GuiTrigger trigA; trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); @@ -465,11 +469,11 @@ HBCWindowPrompt(db1, db2, db3,db4, db5, db7, db6); GuiButton carouselBtn(&carouselBtnImg_g,&carouselBtnImg_g, 2, 3, THEME.carousel_x, THEME.carousel_y, &trigA, &btnSoundOver, &btnClick,1); carouselBtn.SetAlpha(180); - GuiImage homebrewBtnImg(&imgarrangeList); + GuiImage homebrewBtnImg(&homebrewImgData); homebrewBtnImg.SetWidescreen(CFG.widescreen); GuiButton homebrewBtn(homebrewBtnImg.GetWidth(), homebrewBtnImg.GetHeight()); homebrewBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP); - homebrewBtn.SetPosition(430, 410); + homebrewBtn.SetPosition(425, 400); homebrewBtn.SetImage(&homebrewBtnImg); homebrewBtn.SetSoundOver(&btnSoundOver); homebrewBtn.SetSoundClick(&btnClick); @@ -618,7 +622,7 @@ HBCWindowPrompt(db1, db2, db3,db4, db5, db7, db6); w.Append(&sdcardBtn); w.Append(&poweroffBtn); - w.Append(&gameInfo); + w.Append(&gameInfo); if (Settings.godmode) w.Append(&installBtn); w.Append(&homeBtn); @@ -630,7 +634,8 @@ HBCWindowPrompt(db1, db2, db3,db4, db5, db7, db6); w.Append(&listBtn); w.Append(&gridBtn); w.Append(&carouselBtn); - w.Append(&homebrewBtn); + if (Settings.godmode == 1) + w.Append(&homebrewBtn); if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) { @@ -1551,9 +1556,10 @@ static int MenuFormat() VIDEO_WaitVSync (); selected = optionBrowser.GetClickedOption(); - - for (cnt = 0; cnt < MAX_PARTITIONS; cnt++) { - if (cnt == selected) { + + for (cnt = 0; cnt < MAX_PARTITIONS; cnt++) { + if ((cnt == selected)&&((Settings.godmode == 1)|| + (!strcmp("", Settings.unlockCode)))){ partitionEntry *entry = &partitions[selected]; if (entry->size) { sprintf(text, "%s %d : %.2fGB",tr("Partition"), selected+1, entry->size * (sector_size / GBSIZE)); @@ -1577,6 +1583,23 @@ static int MenuFormat() } } } + else if ( (cnt == selected)&&(Settings.godmode == 0) ) { + mainWindow->Remove(&optionBrowser); + char entered[20] = ""; + int result = OnScreenKeyboard(entered, 20,0); + mainWindow->Append(&optionBrowser); + if ( result == 1 ) { + if (!strcmp(entered, Settings.unlockCode)) //if password correct + { + if (Settings.godmode == 0) { + WindowPrompt(tr("Correct Password"),tr("All the features of USB Loader GX are unlocked."),tr("OK")); + Settings.godmode = 1; + } + } else { + WindowPrompt(tr("Wrong Password"),tr("USB Loader GX is protected"),tr("OK")); + } + } + } } if (shutdown == 1) Sys_Shutdown(); diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp index 131bac43..819615c9 100644 --- a/source/prompts/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -2984,7 +2984,7 @@ void GetLanguageToLangCode(char *langcode) { int HBCWindowPrompt(const char *name, const char *coder, const char *version, - const char *release_date, const char *long_description, const char *iconPath, const char *filesize) + const char *release_date, const char *long_description, const char *iconPath, u64 filesize) { int choice = -1; @@ -3075,7 +3075,7 @@ HBCWindowPrompt(const char *name, const char *coder, const char *version, GuiText nameTxt(name,30 , (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); nameTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); nameTxt.SetPosition(0,-15); - nameTxt.SetMaxWidth(430); + nameTxt.SetMaxWidth(430, GuiText::SCROLL); if (coder) @@ -3106,8 +3106,32 @@ HBCWindowPrompt(const char *name, const char *coder, const char *version, long_descriptionTxt.SetMaxWidth(360); long_descriptionTxt.SetNumLines(pagesize); - - GuiText filesizeTxt(filesize, 16, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); + //convert filesize from u64 to char and put unit of measurement after it + char temp2[7]; + char filesizeCH[15]; + f32 sizeAdjusted; + if(filesize<=1024.0) + { + sizeAdjusted = filesize; + snprintf(temp2, sizeof(temp2), "%f",sizeAdjusted); + snprintf(filesizeCH, sizeof(filesizeCH), "%s B",temp2); + + } + if(filesize>1024.0) + { + sizeAdjusted = filesize/1024.0; + snprintf(temp2, sizeof(temp2), "%f",sizeAdjusted); + snprintf(filesizeCH, sizeof(filesizeCH), "%s KB",temp2); + + } + if(filesize>1048576.0) + { + sizeAdjusted = filesize/1048576.0; + snprintf(temp2, sizeof(temp2), "%f",sizeAdjusted); + snprintf(filesizeCH, sizeof(filesizeCH), "%s MB",temp2); + + } + GuiText filesizeTxt(filesizeCH, 16, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); filesizeTxt.SetAlignment(ALIGN_RIGHT, ALIGN_TOP); filesizeTxt.SetPosition(-40,12); diff --git a/source/prompts/PromptWindows.h b/source/prompts/PromptWindows.h index e7a1e661..3ae260aa 100644 --- a/source/prompts/PromptWindows.h +++ b/source/prompts/PromptWindows.h @@ -30,7 +30,7 @@ int CodeDownload(const char *id); void GetLanguageToLangCode(char *langcode); int HBCWindowPrompt(const char *name, const char *coder, const char *version, const char *release_date, const char *long_description, - const char *iconPath, const char *filesize); + const char *iconPath, u64 filesize); #endif diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index dc176140..19c100d7 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -493,6 +493,7 @@ int showGameInfo(char *ID) if (strcmp(gameinfo.title,"") != 0) { snprintf(linebuf, sizeof(linebuf), "%s",gameinfo.title); titleTxt = new GuiText(linebuf, titlefontsize, (GXColor){0,0,0, 255}); + titleTxt->SetMaxWidth(350, GuiText::SCROLL); //while (titleTxt->GetWidth()>250) { titleTxt->SetFontSize(titlefontsize-=2); } titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt->SetPosition(txtXOffset,12+titley); gameinfoWindow.Append(titleTxt); diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index da01ea2f..c1e5957b 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -1286,7 +1286,7 @@ int MenuSettings() } } } else { - WindowPrompt(tr("Coverpath Changed"),tr("Console should be unlocked to modify it."),tr("OK")); + WindowPrompt(tr("Coverpath Change"),tr("Console should be unlocked to modify it."),tr("OK")); } break; case 1: