diff --git a/gui.pnproj b/gui.pnproj index 8f81d634..79647554 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/gui.pnps b/gui.pnps index b0ef8c1f..2154a81b 100644 --- a/gui.pnps +++ b/gui.pnps @@ -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 06feaac1..4f20712f 100644 --- a/source/filelist.h +++ b/source/filelist.h @@ -116,9 +116,30 @@ extern const u32 settings_background_png_size; extern const u8 bg_browser_png[]; extern const u32 bg_browser_png_size; -extern const u8 folder_png[]; -extern const u32 folder_png_size; +extern const u8 icon_archives_png[]; +extern const u32 icon_archives_png_size; +//extern const u8 icon_default_png[]; +//extern const u32 icon_default_png_size; + +extern const u8 icon_folder_png[]; +extern const u32 icon_folder_png_size; +/* +extern const u8 icon_gfx_png[]; +extern const u32 icon_gfx_png_size; + +extern const u8 icon_pls_png[]; +extern const u32 icon_pls_png_size; + +extern const u8 icon_sfx_png[]; +extern const u32 icon_sfx_png_size; + +extern const u8 icon_txt_png[]; +extern const u32 icon_txt_png_size; + +extern const u8 icon_xml_png[]; +extern const u32 icon_xml_png_size; +*/ extern const u8 bg_browser_selection_png[]; extern const u32 bg_browser_selection_png_size; @@ -307,10 +328,10 @@ extern const u32 exit_button_png_size; extern const u8 mp3_stop_png[]; extern const u32 mp3_stop_png_size; - -extern const u8 favorite_png[]; -extern const u32 favorite_png_size; - + +extern const u8 favorite_png[]; +extern const u32 favorite_png_size; + extern const u8 not_favorite_png[]; extern const u32 not_favorite_png_size; @@ -324,8 +345,8 @@ extern const u8 abcIcon_png[]; extern const u32 abcIcon_png_size; extern const u8 playCountIcon_png[]; -extern const u32 playCountIcon_png_size; - +extern const u32 playCountIcon_png_size; + extern const u8 arrangeList_png[]; extern const u32 arrangeList_png_size; diff --git a/source/images/folder.png b/source/images/icon_folder.png similarity index 100% rename from source/images/folder.png rename to source/images/icon_folder.png diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h index 1531c8aa..4cd37530 100644 --- a/source/libwiigui/gui.h +++ b/source/libwiigui/gui.h @@ -51,6 +51,7 @@ extern FreeTypeGX *fontSystem; #define SCROLL_INITIAL_DELAY 20 #define SCROLL_LOOP_DELAY 3 #define PAGESIZE 9 +#define FILEBROWSERSIZE 8 #define MAX_OPTIONS 170 typedef void (*UpdateCallback)(void * e); @@ -1063,7 +1064,14 @@ class GuiFileBrowser : public GuiElement GuiText * fileListText[PAGESIZE]; GuiText * fileListTextOver[PAGESIZE]; GuiImage * fileListBg[PAGESIZE]; + //GuiImage * fileListArchives[PAGESIZE]; + //GuiImage * fileListDefault[PAGESIZE]; GuiImage * fileListFolder[PAGESIZE]; + //GuiImage * fileListGFX[PAGESIZE]; + //GuiImage * fileListPLS[PAGESIZE]; + //GuiImage * fileListSFX[PAGESIZE]; + //GuiImage * fileListTXT[PAGESIZE]; + //GuiImage * fileListXML[PAGESIZE]; GuiButton * arrowUpBtn; GuiButton * arrowDownBtn; @@ -1077,7 +1085,14 @@ class GuiFileBrowser : public GuiElement GuiImageData * bgFileSelection; GuiImageData * bgFileSelectionEntry; + //GuiImageData * fileArchives; + //GuiImageData * fileDefault; GuiImageData * fileFolder; + //GuiImageData * fileGFX; + //GuiImageData * filePLS; + //GuiImageData * fileSFX; + //GuiImageData * fileTXT; + //GuiImageData * fileXML; GuiImageData * scrollbar; GuiImageData * arrowDown; GuiImageData * arrowUp; diff --git a/source/libwiigui/gui_customoptionbrowser.cpp b/source/libwiigui/gui_customoptionbrowser.cpp index 16b06ad4..f4a4e1f2 100644 --- a/source/libwiigui/gui_customoptionbrowser.cpp +++ b/source/libwiigui/gui_customoptionbrowser.cpp @@ -40,6 +40,11 @@ customOptionList::~customOptionList() delete [] name; delete [] value; } +void customOptionList::SetLength(int size) //set number of lines +{ + length = size; + changed = true; +} void customOptionList::SetName(int i, const char *format, ...) { if(i >= 0 && i < length) diff --git a/source/libwiigui/gui_customoptionbrowser.h b/source/libwiigui/gui_customoptionbrowser.h index 1caddf3d..93f14cca 100644 --- a/source/libwiigui/gui_customoptionbrowser.h +++ b/source/libwiigui/gui_customoptionbrowser.h @@ -4,6 +4,7 @@ class customOptionList { public: customOptionList(int size); ~customOptionList(); + void SetLength(int size); void SetName(int i, const char *format, ...) __attribute__((format (printf, 3, 4))); const char *GetName(int i) { diff --git a/source/libwiigui/gui_filebrowser.cpp b/source/libwiigui/gui_filebrowser.cpp index d0b27106..26d8ae53 100644 --- a/source/libwiigui/gui_filebrowser.cpp +++ b/source/libwiigui/gui_filebrowser.cpp @@ -12,8 +12,6 @@ #include "prompts/filebrowser.h" #include "../settings/cfg.h" - -#define FILEBROWSERSIZE 8 /** * Constructor for the GuiFileBrowser class. */ @@ -25,7 +23,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h) selectable = true; listChanged = true; // trigger an initial list update triggerdisabled = false; // trigger disable - focus = 1; // allow focus + focus = 0; // allow focus trigA = new GuiTrigger; trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); @@ -45,8 +43,15 @@ GuiFileBrowser::GuiFileBrowser(int w, int h) snprintf(imgPath, sizeof(imgPath), "%sbg_browser_selection.png", CFG.theme_path); bgFileSelectionEntry = new GuiImageData(imgPath, bg_browser_selection_png); - fileFolder = new GuiImageData(folder_png); - +// fileArchives = new GuiImageData(icon_archives_png); +// fileDefault = new GuiImageData(icon_default_png); + fileFolder = new GuiImageData(icon_folder_png); +// fileGFX = new GuiImageData(icon_gfx_png); +// filePLS = new GuiImageData(icon_pls_png); +// fileSFX = new GuiImageData(icon_sfx_png); +// fileTXT = new GuiImageData(icon_txt_png); +// fileXML = new GuiImageData(icon_xml_png); + snprintf(imgPath, sizeof(imgPath), "%sscrollbar.png", CFG.theme_path); scrollbar = new GuiImageData(imgPath, scrollbar_png); scrollbarImg = new GuiImage(scrollbar); @@ -93,6 +98,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h) scrollbarBoxBtn->SetParent(this); scrollbarBoxBtn->SetImage(scrollbarBoxImg); scrollbarBoxBtn->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); + scrollbarBoxBtn->SetPosition(-10, 0); scrollbarBoxBtn->SetMinY(-10); scrollbarBoxBtn->SetMaxY(156); scrollbarBoxBtn->SetSelectable(false); @@ -113,8 +119,14 @@ GuiFileBrowser::GuiFileBrowser(int w, int h) fileListTextOver[i]->SetMaxWidth(bgFileSelectionImg->GetWidth() - (arrowDownImg->GetWidth()+20), GuiText::SCROLL); fileListBg[i] = new GuiImage(bgFileSelectionEntry); + //fileListArchives[i] = new GuiImage(fileArchives); + //fileListDefault[i] = new GuiImage(fileDefault); fileListFolder[i] = new GuiImage(fileFolder); - + //fileListGFX[i] = new GuiImage(fileGFX); + //fileListPLS[i] = new GuiImage(filePLS); + //fileListSFX[i] = new GuiImage(fileSFX); + //fileListTXT[i] = new GuiImage(fileTXT); + //fileListXML[i] = new GuiImage(fileXML); fileList[i] = new GuiButton(350,30); fileList[i]->SetParent(this); fileList[i]->SetLabel(fileListText[i]); @@ -144,7 +156,14 @@ GuiFileBrowser::~GuiFileBrowser() delete bgFileSelection; delete bgFileSelectionEntry; + //delete fileArchives; + //delete fileDefault; delete fileFolder; + //delete fileGFX; + //delete filePLS; + //delete fileSFX; + //delete fileTXT; + //delete fileXML; delete scrollbar; delete arrowDown; delete arrowUp; @@ -161,7 +180,14 @@ GuiFileBrowser::~GuiFileBrowser() delete fileListTextOver[i]; delete fileList[i]; delete fileListBg[i]; + //delete fileListArchives[i]; + //delete fileListDefault[i]; delete fileListFolder[i]; + //delete fileListGFX[i]; + //delete fileListPLS[i]; + //delete fileListSFX[i]; + //delete fileListTXT[i]; + //delete fileListXML[i]; } } @@ -248,7 +274,7 @@ void GuiFileBrowser::Update(GuiTrigger * t) else if(positionWiimote > scrollbarBoxBtn->GetMaxY()) positionWiimote = scrollbarBoxBtn->GetMaxY(); - browser.pageIndex = (positionWiimote * browser.numEntries)/166.0 - selectedItem; + browser.pageIndex = (positionWiimote * browser.numEntries)/136.0 - selectedItem; if(browser.pageIndex <= 0) { @@ -279,13 +305,13 @@ void GuiFileBrowser::Update(GuiTrigger * t) } - // pad/joystick navigation +/* // pad/joystick navigation if(!focus) { goto endNavigation; // skip navigation listChanged = false; } - +*/ if(t->Right()) { if(browser.pageIndex < browser.numEntries && browser.numEntries > FILEBROWSERSIZE) @@ -338,7 +364,7 @@ void GuiFileBrowser::Update(GuiTrigger * t) } } - endNavigation: + //endNavigation: for(int i=0; iSetPosition(32,0); + fileListTextOver[i]->SetPosition(32,0); + if(fileext) + { + if(!strcasecmp(fileext, ".png") || !strcasecmp(fileext, ".jpg") || !strcasecmp(fileext, ".jpeg") || + !strcasecmp(fileext, ".gif") || !strcasecmp(fileext, ".tga") || !strcasecmp(fileext, ".tpl") || + !strcasecmp(fileext, ".bmp")) { + fileList[i]->SetIcon(fileListGFX[i]); + } else if(!strcasecmp(fileext, ".mp3") || !strcasecmp(fileext, ".ogg") || !strcasecmp(fileext, ".flac") || + !strcasecmp(fileext, ".mpc") || !strcasecmp(fileext, ".m4a") || !strcasecmp(fileext, ".wav")) { + fileList[i]->SetIcon(fileListSFX[i]); + } else if(!strcasecmp(fileext, ".pls") || !strcasecmp(fileext, ".m3u")) { + fileList[i]->SetIcon(fileListPLS[i]); + } else if(!strcasecmp(fileext, ".txt")) { + fileList[i]->SetIcon(fileListTXT[i]); + } else if(!strcasecmp(fileext, ".xml")) { + fileList[i]->SetIcon(fileListXML[i]); + } else if(!strcasecmp(fileext, ".rar") || !strcasecmp(fileext, ".zip") || + !strcasecmp(fileext, ".gz") || !strcasecmp(fileext, ".7z")) { + fileList[i]->SetIcon(fileListArchives[i]); + } else { + fileList[i]->SetIcon(fileListDefault[i]); + } + } else { + fileList[i]->SetIcon(fileListDefault[i]); + } + */ fileList[i]->SetIcon(NULL); fileListText[i]->SetPosition(10,0); fileListTextOver[i]->SetPosition(10,0); @@ -401,7 +456,7 @@ void GuiFileBrowser::Update(GuiTrigger * t) } else { - position = -10+(166*(browser.pageIndex + FILEBROWSERSIZE/2.0) / (browser.numEntries*1.0)); + position = 136*(browser.pageIndex + FILEBROWSERSIZE/2.0) / (browser.numEntries*1.0); if(browser.pageIndex/(FILEBROWSERSIZE/2.0) < 1) position = -10; diff --git a/source/libwiigui/gui_keyboard.cpp b/source/libwiigui/gui_keyboard.cpp index dc1d1bb3..1e742c24 100644 --- a/source/libwiigui/gui_keyboard.cpp +++ b/source/libwiigui/gui_keyboard.cpp @@ -32,7 +32,7 @@ GuiKeyboard::GuiKeyboard(char * t, u32 max, int min, int lang) focus = 0; // allow focus alignmentHor = ALIGN_CENTRE; alignmentVert = ALIGN_MIDDLE; - strlcpy(kbtextstr, t, max); + strncpy(kbtextstr, t, max); // do not change from strncpy to strlcpy, it needs to be padded with 0 kbtextstr[max] = 0; kbtextmaxlen = max; diff --git a/source/main.cpp b/source/main.cpp index c39fdc8a..44553ec0 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -137,7 +137,7 @@ main(int argc, char *argv[]) { /** PAD_Init has to be before InitVideo don't move that **/ PAD_Init(); // initialize PAD/WPAD - USBDevice_deInit();// seems enough to wake up some HDDs if they are in sleep mode when the loader starts (tested with WD MyPassport Essential 2.5") + USBDevice_Init();// seems enough to wake up some HDDs if they are in sleep mode when the loader starts (tested with WD MyPassport Essential 2.5") ret = IOS_ReloadIOS(249); diff --git a/source/menu.cpp b/source/menu.cpp index e484c66b..c439ddff 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -453,7 +453,12 @@ int MenuDiscList() { char spaceinfo[30]; - sprintf(spaceinfo,(mountMethod!=3?"%.2fGB %s %.2fGB %s":" "),freespace,tr("of"),(freespace+used),tr("free")); + if (!strcmp(Settings.db_language,"JA")) { + // needs to be "total...used" for Japanese + sprintf(spaceinfo,(mountMethod!=3?"%.2fGB %s %.2fGB %s":" "),(freespace+used),tr("of"),freespace,tr("free")); + } else { + sprintf(spaceinfo,(mountMethod!=3?"%.2fGB %s %.2fGB %s":" "),freespace,tr("of"),(freespace+used),tr("free")); + } GuiText usedSpaceTxt(spaceinfo, 18, THEME.info); usedSpaceTxt.SetAlignment(THEME.hddinfo_align, ALIGN_TOP); usedSpaceTxt.SetPosition(THEME.hddinfo_x, THEME.hddinfo_y); diff --git a/source/prompts/DiscBrowser.cpp b/source/prompts/DiscBrowser.cpp index d80bbb3c..1cac9626 100644 --- a/source/prompts/DiscBrowser.cpp +++ b/source/prompts/DiscBrowser.cpp @@ -293,23 +293,12 @@ int autoSelectDol(const char *id, bool force) { //Grand Slam Tennis if (strcmp(id,"R5TP69") == 0) return 1493;//from isostar if (strcmp(id,"R5TE69") == 0) return 1493;//starstremr - - //Indiana Jones and the Staff of Kings (Fate of Atlantis) - if (strcmp(id,"RJ8P64") == 0) return 8;//from isostar - if (strcmp(id,"RJ8E64") == 0) return 8;//starstremr - + //Medal of Honor Heroes if (strcmp(id,"RMZX69") == 0) return 492;//from isostar if (strcmp(id,"RMZP69") == 0) return 492;//from isostar if (strcmp(id,"RMZE69") == 0) return 492;//starstremr - - //Metal Slug Anthology - if (strcmp(id,"RMLP7U") == 0) return 56;//from isostar - - //The House Of The Dead 2 & 3 Return - if (strcmp(id,"RHDP8P") == 0) return 149;//from isostar - if (strcmp(id,"RHDE8P") == 0) return 149;//starstremr - + //Tiger Woods 10 if (strcmp(id,"R9OP69") == 0) return 1991;//from isostar if (strcmp(id,"R9OE69") == 0) return 1973;//starstremr @@ -328,10 +317,10 @@ int autoSelectDol(const char *id, bool force) { int autoSelectDolMenu(const char *id, bool force) { + /* char id4[10]; sprintf(id4,"%c%c%c%c",id[0],id[1],id[2],id[3]); - /* switch (CheckForSave(id4)) { case 0: WindowPrompt(tr("NO save"),0,tr("OK")); @@ -348,6 +337,58 @@ int autoSelectDolMenu(const char *id, bool force) { return -1; */ + //Indiana Jones and the Staff of Kings (Fate of Atlantis) + if (strcmp(id,"RJ8E64") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "Fate of Atlantis", tr("Default")); + switch (choice) { + case 1: + choice = 8; //from starstremr + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + if (strcmp(id,"RJ8P64") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "Fate of Atlantis", tr("Default")); + switch (choice) { + case 1: + choice = 8; //from isostar + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + + //Metal Slug Anthology (Metal Slug 6) + if (strcmp(id,"RMLEH4") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "Metal Slug 6", tr("Default")); + switch (choice) { + case 1: + choice = 54; //from lustar + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + if (strcmp(id,"RMLP7U") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "Metal Slug 6", tr("Default")); + switch (choice) { + case 1: + choice = 56; //from isostar + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + //Metroid Prime Trilogy if (strcmp(id,"R3ME01") == 0) { //do not use any alt dol if there is no save game in the nand @@ -399,6 +440,50 @@ int autoSelectDolMenu(const char *id, bool force) { return choice; } + //Rampage: Total Destruction (M1.dol=Rampage, jarvos.dol=Rampage World Tour) + if (strcmp(id,"RPGP5D") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "Rampage", "World Tour", tr("Default")); + switch (choice) { + case 1: + choice = 369; //from Ramzee + break; + case 2: + choice = 368; //from Ramzee + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + + //The House Of The Dead 2 & 3 Return (only to play 2) + if (strcmp(id,"RHDE8P") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "HotD 2", tr("Default")); + switch (choice) { + case 1: + choice = 149; //from starstremr + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + if (strcmp(id,"RHDP8P") == 0) { + int choice = WindowPrompt(tr("Select a DOL"), 0, "HotD 2", tr("Default")); + switch (choice) { + case 1: + choice = 149; //from isostar + break; + default: // no alt dol + choice = 0; + break; + } + return choice; + } + + return -1; } diff --git a/source/prompts/filebrowser.cpp b/source/prompts/filebrowser.cpp index a5bd2e8c..4a9f58fa 100644 --- a/source/prompts/filebrowser.cpp +++ b/source/prompts/filebrowser.cpp @@ -278,7 +278,7 @@ main: GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume); GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume); - GuiImageData folderImgData(folder_png); + GuiImageData folderImgData(icon_folder_png); GuiImage folderImg(&folderImgData); GuiButton folderBtn(folderImg.GetWidth(), folderImg.GetHeight()); folderBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index e5a6e147..dd8f0605 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -466,6 +466,7 @@ int MenuSettings() { w.Remove(&MainButton4); titleTxt.SetText(tr("GUI Settings")); exit = false; + options2.SetLength(13); for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); options2.SetName(0, "%s",tr("App Language")); options2.SetName(1, "%s",tr("Display")); @@ -720,6 +721,7 @@ int MenuSettings() { titleTxt.SetText(tr("Game Load")); exit = false; for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); + options2.SetLength(8); options2.SetName(0, "%s",tr("Video Mode")); options2.SetName(1, "%s",tr("VIDTV Patch")); options2.SetName(2, "%s",tr("Game Language")); @@ -886,6 +888,7 @@ int MenuSettings() { w.Remove(&MainButton4); titleTxt.SetText(tr("Parental Control")); exit = false; + options2.SetLength(3); for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); options2.SetName(0, "%s",tr("Console")); options2.SetName(1, "%s",tr("Password")); @@ -1039,6 +1042,7 @@ int MenuSettings() { w.Remove(&MainButton4); titleTxt.SetText(tr("Sound")); exit = false; + options2.SetLength(3); for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); options2.SetName(0, "%s",tr("Backgroundmusic")); options2.SetName(1, "%s",tr("Music Volume")); @@ -1173,9 +1177,9 @@ int MenuSettings() { w.Remove(&MainButton4); titleTxt.SetText(tr("Custom Paths")); exit = false; + options2.SetLength(10); for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); -// if (Settings.godmode) - options2.SetName(0, "%s", tr("3D Cover Path")); + options2.SetName(0, "%s", tr("3D Cover Path")); options2.SetName(1, "%s", tr("2D Cover Path")); options2.SetName(2, "%s", tr("Disc Artwork Path")); options2.SetName(3, "%s", tr("Theme Path")); @@ -1186,6 +1190,7 @@ int MenuSettings() { options2.SetName(8, "%s", tr("DOL Path")); options2.SetName(9, "%s", tr("Homebrew Apps Path")); for (int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL); + optionBrowser2.SetScrollbar(1); w.Append(&optionBrowser2); optionBrowser2.SetClickable(true); ResumeGui(); @@ -1281,7 +1286,6 @@ int MenuSettings() { strlcpy(entered, Settings.covers2d_path, sizeof(entered)); titleTxt.SetText(tr("2D Cover Path")); int result = BrowseDevice(entered); - //int result = OnScreenKeyboard(entered,43,0); titleTxt.SetText(tr("Custom Paths")); w.Append(&optionBrowser2); w.Append(&backBtn); @@ -1896,7 +1900,7 @@ int GameSettings(struct discHdr * header) { MainButton4.SetEffectGrow(); MainButton4.SetTrigger(&trigA); - customOptionList options2(MAXOPTIONS-1); + customOptionList options2(MAXOPTIONS); GuiCustomOptionBrowser optionBrowser2(396, 280, &options2, CFG.theme_path, "bg_options_settings.png", bg_options_settings_png, 0, 150); optionBrowser2.SetPosition(0, 90); optionBrowser2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); @@ -1935,7 +1939,6 @@ int GameSettings(struct discHdr * header) { w.Append(&titleTxt); w.Append(&backBtn); w.Append(&homo); - //w.Append(&saveBtn); w.Append(&MainButton1); w.Append(&MainButton2); w.Append(&MainButton3); @@ -2021,7 +2024,8 @@ int GameSettings(struct discHdr * header) { w.Remove(&MainButton3); w.Remove(&MainButton4); exit = false; - for (int i = 0; i <= MAXOPTIONS-1; i++) options2.SetName(i, NULL); + options2.SetLength(11); + for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); options2.SetName(0, "%s",tr("Video Mode")); options2.SetName(1, "%s",tr("VIDTV Patch")); options2.SetName(2,"%s", tr("Game Language")); @@ -2033,10 +2037,9 @@ int GameSettings(struct discHdr * header) { options2.SetName(8,"%s", tr("Alternate DOL")); options2.SetName(9,"%s", tr("Selected DOL")); options2.SetName(10,"%s", tr("Block IOS Reload")); - for (int i = 0; i <= MAXOPTIONS-1; i++) options2.SetValue(i, NULL); + for (int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL); optionBrowser2.SetScrollbar(1); w.Append(&optionBrowser2); - //w.Append(&saveBtn); optionBrowser2.SetClickable(true); ResumeGui(); @@ -2304,17 +2307,16 @@ int GameSettings(struct discHdr * header) { w.Remove(&MainButton2); w.Remove(&MainButton3); w.Remove(&MainButton4); - //titleTxt.SetText(tr("Parental Control")); exit = false; - - for (int i = 0; i <= MAXOPTIONS-1; i++) options2.SetName(i, NULL); + options2.SetLength(6); + for (int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); options2.SetName(0,"%s", tr("Uninstall Game")); options2.SetName(1,"%s", tr("Reset Playcounter")); options2.SetName(2,"%s", tr("Delete Cover Artwork")); options2.SetName(3,"%s", tr("Delete Disc Artwork")); options2.SetName(4,"%s", tr("Delete Cheat TXT")); options2.SetName(5,"%s", tr("Delete Cheat GCT")); - for (int i = 0; i <= MAXOPTIONS-1; i++) options2.SetValue(i, NULL); + for (int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL); w.Append(&optionBrowser2); optionBrowser2.SetClickable(true); ResumeGui();