mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-26 05:04:16 +01:00
change the per game settings around a bit.
made the channel browser read database.txt. The text should be in the config path (because i couldn't think of a better place for it). And the format for the txt is the first 3 chars of the 4 char ID, then any 1 character, then the name (read up to 51 chars. eg. ULN USB Loader GX Full Channel HAX Homebrew Channel HAT Nintendo Channel The database for ATD mod follows this format, so its a great place to start. If people are going to be passing around a database, it would be wise to keep custom channels off this, as my WADD that says WadManager is not the same as somebody else's WADQ which could be a self destruct or something. Commented out the code that loads titles.txt. It was reported that this file is keeping WiiSportsResort from loading on some Wiis. And it isn't needed anymore since there is the xml file with all the names in it. I left the code in though in case somebody thinks that it is actually useful. Added 1 more game to the list of known alt dols.
This commit is contained in:
parent
cc590e1ac8
commit
c6fd33eeb1
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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: Last version on http://startgolf.tym.cz/czech.lang \n"
|
"Language-Team: Last version on http://startgolf.tym.cz/czech.lang \n"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-0400\n"
|
||||||
"PO-Revision-Date: 2009-07-24 11:00+0200\n"
|
"PO-Revision-Date: 2009-07-24 11:00+0200\n"
|
||||||
"Last-Translator: Cambo \n"
|
"Last-Translator: Cambo \n"
|
||||||
"Language-Team: FoxeJoe & Cambo\n"
|
"Language-Team: FoxeJoe & Cambo\n"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-0400\n"
|
||||||
"PO-Revision-Date: 2009-07-20 16:40\n"
|
"PO-Revision-Date: 2009-07-20 16:40\n"
|
||||||
"Last-Translator: Sky8000\n"
|
"Last-Translator: Sky8000\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:36+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-0400\n"
|
||||||
"PO-Revision-Date: 2009-07-24 16:45+0200\n"
|
"PO-Revision-Date: 2009-07-24 16:45+0200\n"
|
||||||
"Last-Translator: Katsurou\n"
|
"Last-Translator: Katsurou\n"
|
||||||
"Language-Team: Katsurou, pirateX\n"
|
"Language-Team: Katsurou, pirateX\n"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -4,7 +4,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-07-25 17:16+0200\n"
|
"POT-Creation-Date: 2009-07-26 19:54-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"
|
||||||
|
@ -47,14 +47,14 @@ int CheatMenu(const char * gameID)
|
|||||||
GuiText backBtnTxt(tr("Back") , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
GuiText backBtnTxt(tr("Back") , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
||||||
backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
||||||
GuiImage backBtnImg(&btnOutline);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
GuiButton backBtn(&backBtnImg,&backBtnImg, 2, 3, 160, 400, &trigA, &btnSoundOver, &btnClick,1);
|
GuiButton backBtn(&backBtnImg,&backBtnImg, 2, 3, -140, 400, &trigA, &btnSoundOver, &btnClick,1);
|
||||||
backBtn.SetLabel(&backBtnTxt);
|
backBtn.SetLabel(&backBtnTxt);
|
||||||
backBtn.SetTrigger(&trigB);
|
backBtn.SetTrigger(&trigB);
|
||||||
|
|
||||||
GuiText createBtnTxt(tr("Create") , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
GuiText createBtnTxt(tr("Create") , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
||||||
createBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
createBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
||||||
GuiImage createBtnImg(&btnOutline);
|
GuiImage createBtnImg(&btnOutline);
|
||||||
GuiButton createBtn(&createBtnImg,&createBtnImg, 2, 3, -140, 400, &trigA, &btnSoundOver, &btnClick,1);
|
GuiButton createBtn(&createBtnImg,&createBtnImg, 2, 3, 160, 400, &trigA, &btnSoundOver, &btnClick,1);
|
||||||
createBtn.SetLabel(&createBtnTxt);
|
createBtn.SetLabel(&createBtnTxt);
|
||||||
|
|
||||||
char txtfilename[55];
|
char txtfilename[55];
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "settings/cfg.h"
|
#include "settings/cfg.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "http.h"
|
#include "http.h"
|
||||||
#include "svnrev.h"
|
#include "../svnrev.h"
|
||||||
|
|
||||||
#define PORT 4299
|
#define PORT 4299
|
||||||
|
|
||||||
|
@ -241,6 +241,7 @@ int autoSelectDol(const char *id)
|
|||||||
if (strcmp(id,"RF8X69") == 0) return 464;//from isostar
|
if (strcmp(id,"RF8X69") == 0) return 464;//from isostar
|
||||||
|
|
||||||
if (strcmp(id,"RZTP01") == 0) return 952;//from isostar
|
if (strcmp(id,"RZTP01") == 0) return 952;//from isostar
|
||||||
|
if (strcmp(id,"RZTE01") == 0) return 674;//from starstremr
|
||||||
|
|
||||||
if (strcmp(id,"RMZX69") == 0) return 492;//from isostar
|
if (strcmp(id,"RMZX69") == 0) return 492;//from isostar
|
||||||
if (strcmp(id,"RMZP69") == 0) return 492;//from isostar
|
if (strcmp(id,"RMZP69") == 0) return 492;//from isostar
|
||||||
@ -302,6 +303,8 @@ Grand Slam R5TP69 1493
|
|||||||
|
|
||||||
rboe69 = boogie ntsc = (675)
|
rboe69 = boogie ntsc = (675)
|
||||||
|
|
||||||
|
RZTE01 = WSR = 674
|
||||||
|
|
||||||
Fifa08 RF8P69 463
|
Fifa08 RF8P69 463
|
||||||
Fifa08 RF8X69 464
|
Fifa08 RF8X69 464
|
||||||
Wii Sports Resort RZTP01 952
|
Wii Sports Resort RZTP01 952
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
#include "settings/cfg.h"
|
#include "settings/cfg.h"
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
#include "audio.h"
|
||||||
|
|
||||||
|
#include "xml/xml.h"
|
||||||
|
|
||||||
#include "../wad/title.h"
|
#include "../wad/title.h"
|
||||||
|
|
||||||
@ -36,6 +39,12 @@ int TitleBrowser(u32 type)
|
|||||||
u32 titles[100] ATTRIBUTE_ALIGN(32);
|
u32 titles[100] ATTRIBUTE_ALIGN(32);
|
||||||
s32 ret = -1;
|
s32 ret = -1;
|
||||||
|
|
||||||
|
//open the database file
|
||||||
|
FILE *f;
|
||||||
|
char path[100];
|
||||||
|
|
||||||
|
sprintf(path,"%s/config/database.txt",bootDevice);
|
||||||
|
f = fopen(path, "r");
|
||||||
|
|
||||||
// Get count of titles of our requested type
|
// Get count of titles of our requested type
|
||||||
ret = getTitles_TypeCount(type, &num_titles);
|
ret = getTitles_TypeCount(type, &num_titles);
|
||||||
@ -61,22 +70,58 @@ int TitleBrowser(u32 type)
|
|||||||
customOptionList options3(num_titles);
|
customOptionList options3(num_titles);
|
||||||
//write the titles on the option browser
|
//write the titles on the option browser
|
||||||
u32 i = 0;
|
u32 i = 0;
|
||||||
while (i < num_titles){
|
|
||||||
|
|
||||||
char name[256];
|
|
||||||
|
|
||||||
|
|
||||||
|
while (i < num_titles){
|
||||||
|
//start from the beginning of the file each loop
|
||||||
|
rewind(f);
|
||||||
|
char name[50];
|
||||||
char text[15];
|
char text[15];
|
||||||
|
strcpy(name,"");//make sure name is empty
|
||||||
|
|
||||||
//set the title's name, number, ID to text
|
//set the title's name, number, ID to text
|
||||||
sprintf(text, "%s", titleText(type, titles[i]));
|
sprintf(text, "%s", titleText(type, titles[i]));
|
||||||
getTitle_Name(name, TITLE_ID(type, titles[i]), text);
|
getTitle_Name(name, TITLE_ID(type, titles[i]), text);
|
||||||
|
|
||||||
//set the text to the option browser
|
//get name from database cause i dont like the ADT function
|
||||||
options3.SetName(i, "%s",name);
|
char line[200];
|
||||||
options3.SetValue(i, "%s (%08x)",text,titles[i]);
|
char tmp[50];
|
||||||
|
snprintf(tmp,50,tmp," ");
|
||||||
|
snprintf(name,sizeof(name),"Unknown Title");
|
||||||
|
|
||||||
|
if (!f) {
|
||||||
|
sprintf(name,"Unknown--<No DB>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (fgets(line, sizeof(line), f)) {
|
||||||
|
if (line[0]== text[0]&&
|
||||||
|
line[1]== text[1]&&
|
||||||
|
line[2]== text[2])
|
||||||
|
{ int j=0;
|
||||||
|
for(j=0;(line[j+4]!='\0' || j<51);j++)
|
||||||
|
|
||||||
|
tmp[j]=line[j+4];
|
||||||
|
snprintf(name,sizeof(name),"%s",tmp);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//set the text to the option browser
|
||||||
|
options3.SetName(i, "%s",text);
|
||||||
|
options3.SetValue(i, "%s",name);
|
||||||
|
//options3.SetValue(i, "%s (%08x)",text,titles[i]);
|
||||||
//move on to the next title
|
//move on to the next title
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
|
|
||||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
||||||
@ -150,18 +195,58 @@ int TitleBrowser(u32 type)
|
|||||||
ret = optionBrowser3.GetClickedOption();
|
ret = optionBrowser3.GetClickedOption();
|
||||||
|
|
||||||
if(ret > -1) {//if a click happened
|
if(ret > -1) {//if a click happened
|
||||||
char name[256];
|
|
||||||
char text[15];
|
|
||||||
|
|
||||||
|
char name[50];
|
||||||
|
char text[15];
|
||||||
|
rewind(f);
|
||||||
|
strcpy(name,"");//make sure name is empty
|
||||||
|
|
||||||
|
|
||||||
|
//set the title's name, number, ID to text
|
||||||
sprintf(text, "%s", titleText(type, titles[ret]));
|
sprintf(text, "%s", titleText(type, titles[ret]));
|
||||||
getTitle_Name(name, TITLE_ID(type, titles[ret]), text);
|
getTitle_Name(name, TITLE_ID(type, titles[ret]), text);
|
||||||
|
|
||||||
|
//get name from database cause i dont like the ADT function
|
||||||
|
char line[200];
|
||||||
|
char tmp[50];
|
||||||
|
snprintf(tmp,50,tmp," ");
|
||||||
|
snprintf(name,sizeof(name),"Unknown Title");
|
||||||
|
|
||||||
|
if (!f) {
|
||||||
|
sprintf(name,"Unknown--<No DB>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (fgets(line, sizeof(line), f)) {
|
||||||
|
if (line[0]== text[0]&&
|
||||||
|
line[1]== text[1]&&
|
||||||
|
line[2]== text[2])
|
||||||
|
{ int j=0;
|
||||||
|
for(j=0;(line[j+4]!='\0' || j<51);j++)
|
||||||
|
|
||||||
|
tmp[j]=line[j+4];
|
||||||
|
snprintf(name,sizeof(name),"%s",tmp);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
char temp[100];
|
char temp[100];
|
||||||
//prompt to boot selected title
|
//prompt to boot selected title
|
||||||
snprintf(temp, sizeof(temp), "%s : %s",text,name);
|
snprintf(temp, sizeof(temp), "%s : %s",text,name);
|
||||||
int choice = WindowPrompt("Boot?", temp, tr("OK"), tr("Cancel"));
|
int choice = WindowPrompt("Boot?", temp, tr("OK"), tr("Cancel"));
|
||||||
if(choice) {//if they say yes
|
if(choice) {//if they say yes
|
||||||
|
|
||||||
|
|
||||||
|
//stop all this stuff before starting the channel
|
||||||
|
fclose(f);
|
||||||
|
CloseXMLDatabase();
|
||||||
|
ExitGUIThreads();
|
||||||
|
ShutdownAudio();
|
||||||
|
StopGX();
|
||||||
WII_Initialize();
|
WII_Initialize();
|
||||||
WII_LaunchTitle(TITLE_ID(type,titles[ret]));
|
WII_LaunchTitle(TITLE_ID(type,titles[ret]));
|
||||||
//this really shouldn't be needed because the title will be booted
|
//this really shouldn't be needed because the title will be booted
|
||||||
@ -183,6 +268,7 @@ int TitleBrowser(u32 type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
HaltGui();
|
HaltGui();
|
||||||
mainWindow->Remove(&w);
|
mainWindow->Remove(&w);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
@ -1770,10 +1770,39 @@ int MenuSettings()
|
|||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
int GameSettings(struct discHdr * header)
|
int GameSettings(struct discHdr * header)
|
||||||
{
|
{
|
||||||
bool exit = false;
|
int menu = MENU_NONE;
|
||||||
int ret;
|
int ret;
|
||||||
|
int choice = 0;
|
||||||
|
bool exit = false;
|
||||||
|
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
int pagetodisplay=1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
GuiSound btnClick1(button_click_pcm, button_click_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
||||||
|
|
||||||
|
char imgPath[100];
|
||||||
|
|
||||||
|
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
|
||||||
|
GuiImageData btnOutline(imgPath, button_dialogue_box_png);
|
||||||
|
snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
|
||||||
|
GuiImageData settingsbg(imgPath, settings_background_png);
|
||||||
|
|
||||||
|
snprintf(imgPath, sizeof(imgPath), "%ssettings_title.png", CFG.theme_path);
|
||||||
|
GuiImageData MainButtonImgData(imgPath, settings_title_png);
|
||||||
|
|
||||||
|
snprintf(imgPath, sizeof(imgPath), "%ssettings_title_over.png", CFG.theme_path);
|
||||||
|
GuiImageData MainButtonImgOverData(imgPath, settings_title_over_png);
|
||||||
|
|
||||||
|
GuiTrigger trigA;
|
||||||
|
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
|
GuiTrigger trigHome;
|
||||||
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
||||||
|
GuiTrigger trigB;
|
||||||
|
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
||||||
|
|
||||||
char gameName[31];
|
char gameName[31];
|
||||||
|
|
||||||
@ -1786,24 +1815,8 @@ int GameSettings(struct discHdr * header)
|
|||||||
strncat(gameName, "...", 3);
|
strncat(gameName, "...", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
char imgPath[100];
|
|
||||||
|
|
||||||
snprintf(imgPath, sizeof(imgPath), "%socarina.png", CFG.theme_path);
|
|
||||||
GuiImageData btnOcarina(imgPath, ocarina_png);
|
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
|
|
||||||
GuiImageData btnOutline(imgPath, button_dialogue_box_png);
|
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sgamesettings_background.png", CFG.theme_path);
|
|
||||||
GuiImageData settingsbg(imgPath, settings_background_png);
|
|
||||||
|
|
||||||
GuiTrigger trigA;
|
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
|
||||||
GuiTrigger trigHome;
|
|
||||||
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
|
||||||
GuiTrigger trigB;
|
|
||||||
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
|
||||||
|
|
||||||
GuiText titleTxt(get_title(header), 28, (GXColor){0, 0, 0, 255});
|
GuiText titleTxt(get_title(header), 28, (GXColor){0, 0, 0, 255});
|
||||||
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
@ -1811,10 +1824,20 @@ int GameSettings(struct discHdr * header)
|
|||||||
titleTxt.SetMaxWidth(356, GuiText::SCROLL);
|
titleTxt.SetMaxWidth(356, GuiText::SCROLL);
|
||||||
|
|
||||||
GuiImage settingsbackground(&settingsbg);
|
GuiImage settingsbackground(&settingsbg);
|
||||||
GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight());
|
|
||||||
settingsbackgroundbtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
GuiText backBtnTxt(tr("Back") , 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
||||||
settingsbackgroundbtn.SetPosition(0, 0);
|
backBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
||||||
settingsbackgroundbtn.SetImage(&settingsbackground);
|
GuiImage backBtnImg(&btnOutline);
|
||||||
|
if (Settings.wsprompt == yes){
|
||||||
|
backBtnTxt.SetWidescreen(CFG.widescreen);
|
||||||
|
backBtnImg.SetWidescreen(CFG.widescreen);
|
||||||
|
}
|
||||||
|
GuiButton backBtn(&backBtnImg,&backBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1);
|
||||||
|
backBtn.SetLabel(&backBtnTxt);
|
||||||
|
backBtn.SetTrigger(&trigB);
|
||||||
|
|
||||||
|
GuiButton homo(1,1);
|
||||||
|
homo.SetTrigger(&trigHome);
|
||||||
|
|
||||||
GuiText saveBtnTxt(tr("Save"), 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
GuiText saveBtnTxt(tr("Save"), 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
||||||
saveBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
saveBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
||||||
@ -1822,56 +1845,145 @@ int GameSettings(struct discHdr * header)
|
|||||||
if (Settings.wsprompt == yes){
|
if (Settings.wsprompt == yes){
|
||||||
saveBtnTxt.SetWidescreen(CFG.widescreen);
|
saveBtnTxt.SetWidescreen(CFG.widescreen);
|
||||||
saveBtnImg.SetWidescreen(CFG.widescreen);}
|
saveBtnImg.SetWidescreen(CFG.widescreen);}
|
||||||
GuiButton saveBtn(&saveBtnImg,&saveBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1);
|
GuiButton saveBtn(&saveBtnImg,&saveBtnImg, 2, 3, 180, 400, &trigA, &btnSoundOver, &btnClick,1);
|
||||||
saveBtn.SetScale(0.9);
|
|
||||||
saveBtn.SetLabel(&saveBtnTxt);
|
saveBtn.SetLabel(&saveBtnTxt);
|
||||||
|
|
||||||
GuiText cancelBtnTxt(tr("Back"), 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
|
||||||
cancelBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
|
||||||
GuiImage cancelBtnImg(&btnOutline);
|
|
||||||
if (Settings.wsprompt == yes){
|
|
||||||
cancelBtnTxt.SetWidescreen(CFG.widescreen);
|
|
||||||
cancelBtnImg.SetWidescreen(CFG.widescreen);}
|
|
||||||
GuiButton cancelBtn(&cancelBtnImg,&cancelBtnImg, 2, 3, 180, 400, &trigA, &btnSoundOver, &btnClick,1);
|
|
||||||
cancelBtn.SetScale(0.9);
|
|
||||||
cancelBtn.SetLabel(&cancelBtnTxt);
|
|
||||||
cancelBtn.SetTrigger(&trigB);
|
|
||||||
|
|
||||||
GuiText deleteBtnTxt(tr("Uninstall Menu"), 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
|
||||||
deleteBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
|
|
||||||
GuiImage deleteBtnImg(&btnOutline);
|
|
||||||
if (Settings.wsprompt == yes){
|
|
||||||
deleteBtnTxt.SetWidescreen(CFG.widescreen);
|
|
||||||
deleteBtnImg.SetWidescreen(CFG.widescreen);}
|
|
||||||
GuiButton deleteBtn(&deleteBtnImg,&deleteBtnImg, 2, 3, 0, 400, &trigA, &btnSoundOver, &btnClick,1);
|
|
||||||
deleteBtn.SetScale(0.9);
|
|
||||||
deleteBtn.SetLabel(&deleteBtnTxt);
|
|
||||||
|
|
||||||
GuiImage GCTBtnImg(&btnOcarina);
|
char MainButtonText[50];
|
||||||
if (Settings.wsprompt == yes){
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", " ");
|
||||||
GCTBtnImg.SetWidescreen(CFG.widescreen);}
|
|
||||||
GuiButton GCTBtn(&GCTBtnImg,&GCTBtnImg, ALIGN_RIGHT, ALIGN_TOP, -20, 90, &trigA, &btnSoundOver, &btnClick,1);
|
|
||||||
GCTBtn.SetSize(80,80);
|
|
||||||
GCTBtnImg.SetScale(0.5);
|
|
||||||
|
|
||||||
customOptionList options3(11);
|
GuiImage MainButton1Img(&MainButtonImgData);
|
||||||
GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_gamesettings.png", bg_options_settings_png, 1, 180);
|
GuiImage MainButton1ImgOver(&MainButtonImgOverData);
|
||||||
optionBrowser3.SetPosition(0, 90);
|
GuiText MainButton1Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
|
||||||
optionBrowser3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
MainButton1Txt.SetMaxWidth(MainButton1Img.GetWidth());
|
||||||
|
GuiButton MainButton1(MainButton1Img.GetWidth(), MainButton1Img.GetHeight());
|
||||||
|
MainButton1.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
|
MainButton1.SetPosition(0, 90);
|
||||||
|
MainButton1.SetImage(&MainButton1Img);
|
||||||
|
MainButton1.SetImageOver(&MainButton1ImgOver);
|
||||||
|
MainButton1.SetLabel(&MainButton1Txt);
|
||||||
|
MainButton1.SetSoundOver(&btnSoundOver);
|
||||||
|
MainButton1.SetSoundClick(&btnClick1);
|
||||||
|
MainButton1.SetEffectGrow();
|
||||||
|
MainButton1.SetTrigger(&trigA);
|
||||||
|
|
||||||
|
GuiImage MainButton2Img(&MainButtonImgData);
|
||||||
|
GuiImage MainButton2ImgOver(&MainButtonImgOverData);
|
||||||
|
GuiText MainButton2Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
|
||||||
|
MainButton2Txt.SetMaxWidth(MainButton2Img.GetWidth());
|
||||||
|
GuiButton MainButton2(MainButton2Img.GetWidth(), MainButton2Img.GetHeight());
|
||||||
|
MainButton2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
|
MainButton2.SetPosition(0, 160);
|
||||||
|
MainButton2.SetImage(&MainButton2Img);
|
||||||
|
MainButton2.SetImageOver(&MainButton2ImgOver);
|
||||||
|
MainButton2.SetLabel(&MainButton2Txt);
|
||||||
|
MainButton2.SetSoundOver(&btnSoundOver);
|
||||||
|
MainButton2.SetSoundClick(&btnClick1);
|
||||||
|
MainButton2.SetEffectGrow();
|
||||||
|
MainButton2.SetTrigger(&trigA);
|
||||||
|
|
||||||
|
GuiImage MainButton3Img(&MainButtonImgData);
|
||||||
|
GuiImage MainButton3ImgOver(&MainButtonImgOverData);
|
||||||
|
GuiText MainButton3Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
|
||||||
|
MainButton3Txt.SetMaxWidth(MainButton3Img.GetWidth());
|
||||||
|
GuiButton MainButton3(MainButton3Img.GetWidth(), MainButton3Img.GetHeight());
|
||||||
|
MainButton3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
|
MainButton3.SetPosition(0, 230);
|
||||||
|
MainButton3.SetImage(&MainButton3Img);
|
||||||
|
MainButton3.SetImageOver(&MainButton3ImgOver);
|
||||||
|
MainButton3.SetLabel(&MainButton3Txt);
|
||||||
|
MainButton3.SetSoundOver(&btnSoundOver);
|
||||||
|
MainButton3.SetSoundClick(&btnClick1);
|
||||||
|
MainButton3.SetEffectGrow();
|
||||||
|
MainButton3.SetTrigger(&trigA);
|
||||||
|
|
||||||
|
GuiImage MainButton4Img(&MainButtonImgData);
|
||||||
|
GuiImage MainButton4ImgOver(&MainButtonImgOverData);
|
||||||
|
GuiText MainButton4Txt(MainButtonText, 22, (GXColor){0, 0, 0, 255});
|
||||||
|
MainButton4Txt.SetMaxWidth(MainButton4Img.GetWidth());
|
||||||
|
GuiButton MainButton4(MainButton4Img.GetWidth(), MainButton4Img.GetHeight());
|
||||||
|
MainButton4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
|
MainButton4.SetPosition(0, 300);
|
||||||
|
MainButton4.SetImage(&MainButton4Img);
|
||||||
|
MainButton4.SetImageOver(&MainButton4ImgOver);
|
||||||
|
MainButton4.SetLabel(&MainButton4Txt);
|
||||||
|
MainButton4.SetSoundOver(&btnSoundOver);
|
||||||
|
MainButton4.SetSoundClick(&btnClick1);
|
||||||
|
MainButton4.SetEffectGrow();
|
||||||
|
MainButton4.SetTrigger(&trigA);
|
||||||
|
|
||||||
|
customOptionList options2(MAXOPTIONS-1);
|
||||||
|
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);
|
||||||
|
|
||||||
|
GuiWindow w(screenwidth, screenheight);
|
||||||
|
int opt_lang = languageChoice; // backup language setting
|
||||||
|
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
|
||||||
|
|
||||||
|
int pageToDisplay = 1;
|
||||||
|
while ( pageToDisplay > 0) //set pageToDisplay to 0 to quit
|
||||||
|
{
|
||||||
|
VIDEO_WaitVSync ();
|
||||||
|
|
||||||
|
menu = MENU_NONE;
|
||||||
|
|
||||||
|
/** Standard procedure made in all pages **/
|
||||||
|
MainButton1.StopEffect();
|
||||||
|
MainButton2.StopEffect();
|
||||||
|
MainButton3.StopEffect();
|
||||||
|
MainButton4.StopEffect();
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
GuiWindow w(screenwidth, screenheight);
|
|
||||||
w.Append(&settingsbackgroundbtn);
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr("Game Load"));
|
||||||
|
MainButton1Txt.SetText(MainButtonText);
|
||||||
|
snprintf(MainButtonText, sizeof(MainButtonText), "Ocarina");
|
||||||
|
MainButton2Txt.SetText(MainButtonText);
|
||||||
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr("Uninstall Menu"));
|
||||||
|
MainButton3Txt.SetText(MainButtonText);
|
||||||
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr("Default Gamesettings"));
|
||||||
|
MainButton4Txt.SetText(MainButtonText);
|
||||||
|
|
||||||
|
mainWindow->RemoveAll();
|
||||||
|
mainWindow->Append(&w);
|
||||||
|
w.RemoveAll();
|
||||||
|
w.Append(&settingsbackground);
|
||||||
w.Append(&titleTxt);
|
w.Append(&titleTxt);
|
||||||
w.Append(&deleteBtn);
|
w.Append(&backBtn);
|
||||||
w.Append(&saveBtn);
|
w.Append(&homo);
|
||||||
w.Append(&cancelBtn);
|
//w.Append(&saveBtn);
|
||||||
w.Append(&optionBrowser3);
|
w.Append(&MainButton1);
|
||||||
w.Append(&GCTBtn);
|
w.Append(&MainButton2);
|
||||||
|
w.Append(&MainButton3);
|
||||||
|
w.Append(&MainButton4);
|
||||||
|
|
||||||
|
/** Disable ability to click through MainButtons */
|
||||||
|
optionBrowser2.SetClickable(false);
|
||||||
|
/** Default no scrollbar and reset position **/
|
||||||
|
optionBrowser2.SetScrollbar(0);
|
||||||
|
optionBrowser2.SetOffset(0);
|
||||||
|
|
||||||
|
MainButton1.StopEffect();
|
||||||
|
MainButton2.StopEffect();
|
||||||
|
MainButton3.StopEffect();
|
||||||
|
MainButton4.StopEffect();
|
||||||
|
|
||||||
|
MainButton1.SetEffectGrow();
|
||||||
|
MainButton2.SetEffectGrow();
|
||||||
|
MainButton3.SetEffectGrow();
|
||||||
|
MainButton4.SetEffectGrow();
|
||||||
|
|
||||||
|
|
||||||
|
MainButton1.SetEffect(EFFECT_FADE, 20);
|
||||||
|
MainButton2.SetEffect(EFFECT_FADE, 20);
|
||||||
|
MainButton3.SetEffect(EFFECT_FADE, 20);
|
||||||
|
MainButton4.SetEffect(EFFECT_FADE, 20);
|
||||||
|
|
||||||
mainWindow->Append(&w);
|
mainWindow->Append(&w);
|
||||||
|
|
||||||
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
|
|
||||||
|
|
||||||
if (game_cfg)//if there are saved settings for this game use them
|
if (game_cfg)//if there are saved settings for this game use them
|
||||||
{
|
{
|
||||||
@ -1908,86 +2020,187 @@ int GameSettings(struct discHdr * header)
|
|||||||
sprintf(alternatedname, " ");
|
sprintf(alternatedname, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
int opt_lang = languageChoice; // backup language setting
|
|
||||||
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
|
while(MainButton1.GetEffect() > 0) usleep(50);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while(menu == MENU_NONE)
|
||||||
|
{
|
||||||
|
VIDEO_WaitVSync ();
|
||||||
|
|
||||||
|
if(MainButton1.GetState() == STATE_CLICKED) {
|
||||||
|
w.Append(&saveBtn);
|
||||||
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
||||||
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
||||||
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
||||||
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
||||||
|
while(MainButton1.GetEffect() > 0) usleep(50);
|
||||||
|
HaltGui();
|
||||||
|
w.Remove(&MainButton1);
|
||||||
|
w.Remove(&MainButton2);
|
||||||
|
w.Remove(&MainButton3);
|
||||||
|
w.Remove(&MainButton4);
|
||||||
|
exit = false;
|
||||||
|
for(int i = 0; i <= MAXOPTIONS-1; 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"));
|
||||||
|
options2.SetName(3, "Ocarina");
|
||||||
|
options2.SetName(4, "IOS");
|
||||||
|
options2.SetName(5,"%s", tr("Parental control"));
|
||||||
|
options2.SetName(6,"%s", tr("Error 002 fix"));
|
||||||
|
options2.SetName(7,"%s", tr("Patch Country Strings"));
|
||||||
|
options2.SetName(8,"%s", tr("Alternate DOL"));
|
||||||
|
options2.SetName(9,"%s", tr("DOL from disc"));
|
||||||
|
options2.SetName(10,"%s", tr("Block IOS Reload"));
|
||||||
|
for(int i = 0; i <= MAXOPTIONS-1; i++) options2.SetValue(i, NULL);
|
||||||
|
optionBrowser2.SetScrollbar(1);
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
|
//w.Append(&saveBtn);
|
||||||
|
optionBrowser2.SetClickable(true);
|
||||||
|
ResumeGui();
|
||||||
|
|
||||||
|
VIDEO_WaitVSync ();
|
||||||
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
||||||
|
while(optionBrowser2.GetEffect() > 0) usleep(50);
|
||||||
|
|
||||||
|
int returnhere = 1;
|
||||||
|
char * languagefile;
|
||||||
|
languagefile = strrchr(Settings.language_path, '/')+1;
|
||||||
|
|
||||||
while(!exit)
|
while(!exit)
|
||||||
{
|
{
|
||||||
VIDEO_WaitVSync ();
|
VIDEO_WaitVSync ();
|
||||||
|
|
||||||
if (pagetodisplay==1){
|
returnhere = 1;
|
||||||
options3.SetName(0,"%s", tr("Video Mode"));
|
|
||||||
options3.SetName(1,"%s", tr("VIDTV Patch"));
|
|
||||||
options3.SetName(2,"%s", tr("Game Language"));
|
|
||||||
options3.SetName(3, "Ocarina");
|
|
||||||
options3.SetName(4, "IOS");
|
|
||||||
options3.SetName(5,"%s", tr("Parental control"));
|
|
||||||
options3.SetName(6,"%s", tr("Error 002 fix"));
|
|
||||||
options3.SetName(7,"%s", tr("Patch Country Strings"));
|
|
||||||
options3.SetName(8,"%s", tr("Alternate DOL"));
|
|
||||||
options3.SetName(9,"%s", tr("DOL from disc"));
|
|
||||||
options3.SetName(10,"%s", tr("Block IOS Reload"));
|
|
||||||
|
|
||||||
if (videoChoice == discdefault) options3.SetValue(0,"%s",tr("Disc Default"));
|
if(videoChoice >= 6)
|
||||||
else if (videoChoice == systemdefault) options3.SetValue(0,"%s",tr("System Default"));
|
videoChoice = 0;
|
||||||
else if (videoChoice == patch) options3.SetValue(0,"%s",tr("AutoPatch"));
|
if(viChoice >= 2)
|
||||||
else if (videoChoice == pal50) options3.SetValue(0,"%s PAL50",tr("Force"));
|
viChoice = 0;
|
||||||
else if (videoChoice == pal60) options3.SetValue(0,"%s PAL60",tr("Force"));
|
if (languageChoice >= 11)
|
||||||
else if (videoChoice == ntsc) options3.SetValue(0,"%s NTSC",tr("Force"));
|
languageChoice = 0;
|
||||||
|
if ( ocarinaChoice >= 2)
|
||||||
|
ocarinaChoice = 0;
|
||||||
|
if ( Settings.wsprompt > 1 )
|
||||||
|
Settings.wsprompt = 0;
|
||||||
|
if ( iosChoice >= 3)
|
||||||
|
iosChoice = 0;
|
||||||
|
if ( Settings.wiilight > 2 )
|
||||||
|
Settings.wiilight = 0;
|
||||||
|
if(parentalcontrolChoice >= 5)
|
||||||
|
parentalcontrolChoice = 0;
|
||||||
|
if(fix002 >= 3)
|
||||||
|
fix002 = 0; //RUMBLE
|
||||||
|
if(countrystrings >= 2)
|
||||||
|
countrystrings = 0;
|
||||||
|
if(alternatedol >= 3)
|
||||||
|
alternatedol = 0;
|
||||||
|
if(reloadblock >= 2)
|
||||||
|
reloadblock = 0;
|
||||||
|
|
||||||
if (viChoice == on) options3.SetValue(1,"%s",tr("ON"));
|
if (videoChoice == discdefault) options2.SetValue(0,"%s",tr("Disc Default"));
|
||||||
else if (viChoice == off) options3.SetValue(1,"%s",tr("OFF"));
|
else if (videoChoice == systemdefault) options2.SetValue(0,"%s",tr("System Default"));
|
||||||
|
else if (videoChoice == patch) options2.SetValue(0,"%s",tr("AutoPatch"));
|
||||||
|
else if (videoChoice == pal50) options2.SetValue(0,"%s PAL50",tr("Force"));
|
||||||
|
else if (videoChoice == pal60) options2.SetValue(0,"%s PAL60",tr("Force"));
|
||||||
|
else if (videoChoice == ntsc) options2.SetValue(0,"%s NTSC",tr("Force"));
|
||||||
|
|
||||||
if (languageChoice == ConsoleLangDefault) options3.SetValue(2,"%s",tr("Console Default"));
|
if (viChoice == on) options2.SetValue(1,"%s",tr("ON"));
|
||||||
else if (languageChoice == jap) options3.SetValue(2,"%s",tr("Japanese"));
|
else if (viChoice == off) options2.SetValue(1,"%s",tr("OFF"));
|
||||||
else if (languageChoice == ger) options3.SetValue(2,"%s",tr("German"));
|
|
||||||
else if (languageChoice == eng) options3.SetValue(2,"%s",tr("English"));
|
|
||||||
else if (languageChoice == fren) options3.SetValue(2,"%s",tr("French"));
|
|
||||||
else if (languageChoice == esp) options3.SetValue(2,"%s",tr("Spanish"));
|
|
||||||
else if (languageChoice == it) options3.SetValue(2,"%s",tr("Italian"));
|
|
||||||
else if (languageChoice == dut) options3.SetValue(2,"%s",tr("Dutch"));
|
|
||||||
else if (languageChoice == schin) options3.SetValue(2,"%s",tr("SChinese"));
|
|
||||||
else if (languageChoice == tchin) options3.SetValue(2,"%s",tr("TChinese"));
|
|
||||||
else if (languageChoice == kor) options3.SetValue(2,"%s",tr("Korean"));
|
|
||||||
|
|
||||||
if (ocarinaChoice == on) options3.SetValue(3,"%s",tr("ON"));
|
if (languageChoice == ConsoleLangDefault) options2.SetValue(2,"%s",tr("Console Default"));
|
||||||
else if (ocarinaChoice == off) options3.SetValue(3,"%s",tr("OFF"));
|
else if (languageChoice == jap) options2.SetValue(2,"%s",tr("Japanese"));
|
||||||
|
else if (languageChoice == ger) options2.SetValue(2,"%s",tr("German"));
|
||||||
|
else if (languageChoice == eng) options2.SetValue(2,"%s",tr("English"));
|
||||||
|
else if (languageChoice == fren) options2.SetValue(2,"%s",tr("French"));
|
||||||
|
else if (languageChoice == esp) options2.SetValue(2,"%s",tr("Spanish"));
|
||||||
|
else if (languageChoice == it) options2.SetValue(2,"%s",tr("Italian"));
|
||||||
|
else if (languageChoice == dut) options2.SetValue(2,"%s",tr("Dutch"));
|
||||||
|
else if (languageChoice == schin) options2.SetValue(2,"%s",tr("SChinese"));
|
||||||
|
else if (languageChoice == tchin) options2.SetValue(2,"%s",tr("TChinese"));
|
||||||
|
else if (languageChoice == kor) options2.SetValue(2,"%s",tr("Korean"));
|
||||||
|
|
||||||
if (iosChoice == i249) options3.SetValue(4,"249");
|
if (ocarinaChoice == on) options2.SetValue(3,"%s",tr("ON"));
|
||||||
else if (iosChoice == i222) options3.SetValue(4,"222");
|
else if (ocarinaChoice == off) options2.SetValue(3,"%s",tr("OFF"));
|
||||||
else if (iosChoice == i223) options3.SetValue(4,"223");
|
|
||||||
|
|
||||||
if (parentalcontrolChoice == 0) options3.SetValue(5, tr("0 (Everyone)"));
|
if (iosChoice == i249) options2.SetValue(4,"249");
|
||||||
else if (parentalcontrolChoice == 1) options3.SetValue(5, tr("1 (Child 7+)"));
|
else if (iosChoice == i222) options2.SetValue(4,"222");
|
||||||
else if (parentalcontrolChoice == 2) options3.SetValue(5, tr("2 (Teen 12+)"));
|
else if (iosChoice == i223) options2.SetValue(4,"223");
|
||||||
else if (parentalcontrolChoice == 3) options3.SetValue(5, tr("3 (Mature 16+)"));
|
|
||||||
else if (parentalcontrolChoice == 4) options3.SetValue(5, tr("4 (Adults Only 18+)"));
|
|
||||||
|
|
||||||
if (fix002 == on) options3.SetValue(6,tr("ON"));
|
if (parentalcontrolChoice == 0) options2.SetValue(5, tr("0 (Everyone)"));
|
||||||
else if (fix002 == off) options3.SetValue(6,tr("OFF"));
|
else if (parentalcontrolChoice == 1) options2.SetValue(5, tr("1 (Child 7+)"));
|
||||||
else if (fix002 == anti) options3.SetValue(6,tr("Anti"));
|
else if (parentalcontrolChoice == 2) options2.SetValue(5, tr("2 (Teen 12+)"));
|
||||||
|
else if (parentalcontrolChoice == 3) options2.SetValue(5, tr("3 (Mature 16+)"));
|
||||||
|
else if (parentalcontrolChoice == 4) options2.SetValue(5, tr("4 (Adults Only 18+)"));
|
||||||
|
|
||||||
if (countrystrings == on) options3.SetValue(7,tr("ON"));
|
if (fix002 == on) options2.SetValue(6,tr("ON"));
|
||||||
else if (countrystrings == off) options3.SetValue(7,tr("OFF"));
|
else if (fix002 == off) options2.SetValue(6,tr("OFF"));
|
||||||
|
else if (fix002 == anti) options2.SetValue(6,tr("Anti"));
|
||||||
|
|
||||||
if (alternatedol == on) options3.SetValue(8,tr("DOL from SD"));
|
if (countrystrings == on) options2.SetValue(7,tr("ON"));
|
||||||
if (alternatedol == 2) options3.SetValue(8,tr("DOL from disc"));
|
else if (countrystrings == off) options2.SetValue(7,tr("OFF"));
|
||||||
else if (alternatedol == off) options3.SetValue(8,tr("OFF"));
|
|
||||||
|
|
||||||
if (alternatedol == on) options3.SetValue(9,tr("SD selected"));
|
if (alternatedol == on) options2.SetValue(8,tr("DOL from SD"));
|
||||||
else if (alternatedol == off) options3.SetValue(9,tr("OFF"));
|
if (alternatedol == 2) options2.SetValue(8,tr("DOL from disc"));
|
||||||
else options3.SetValue(9, alternatedname);
|
else if (alternatedol == off) options2.SetValue(8,tr("OFF"));
|
||||||
|
|
||||||
if (reloadblock == on) options3.SetValue(10,tr("ON"));
|
if (alternatedol == on) options2.SetValue(9,tr("SD selected"));
|
||||||
else if (reloadblock == off) options3.SetValue(10,tr("OFF"));
|
else if (alternatedol == off) options2.SetValue(9,tr("OFF"));
|
||||||
|
else options2.SetValue(9, alternatedname);
|
||||||
|
|
||||||
|
if (reloadblock == on) options2.SetValue(10,tr("ON"));
|
||||||
|
else if (reloadblock == off) options2.SetValue(10,tr("OFF"));
|
||||||
|
|
||||||
|
if(backBtn.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
backBtn.ResetState();
|
||||||
|
exit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(shutdown == 1)
|
if(shutdown == 1)
|
||||||
Sys_Shutdown();
|
Sys_Shutdown();
|
||||||
if(reset == 1)
|
else if(reset == 1)
|
||||||
Sys_Reboot();
|
Sys_Reboot();
|
||||||
|
|
||||||
ret = optionBrowser3.GetClickedOption();
|
else if(menu == MENU_DISCLIST) {
|
||||||
|
w.Remove(&optionBrowser2);
|
||||||
|
w.Remove(&backBtn);
|
||||||
|
WindowCredits();
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
|
w.Append(&backBtn);
|
||||||
|
}
|
||||||
|
else if(homo.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
cfg_save_global();
|
||||||
|
optionBrowser2.SetState(STATE_DISABLED);
|
||||||
|
s32 thetimeofbg = bgMusic->GetPlayTime();
|
||||||
|
bgMusic->Stop();
|
||||||
|
choice = WindowExitPrompt(tr("Exit USB Loader GX?"),0, tr("Back to Loader"),tr("Wii Menu"),tr("Back"),0);
|
||||||
|
if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
|
||||||
|
{
|
||||||
|
bgMusic->Play();
|
||||||
|
} else {
|
||||||
|
bgMusic->PlayOggFile(Settings.ogg_path);
|
||||||
|
}
|
||||||
|
bgMusic->SetPlayTime(thetimeofbg);
|
||||||
|
SetVolumeOgg(255*(Settings.volume/100.0));
|
||||||
|
if(choice == 3) {
|
||||||
|
Sys_LoadMenu(); // Back to System Menu
|
||||||
|
} else if (choice == 2) {
|
||||||
|
Sys_BackToLoader();
|
||||||
|
} else {
|
||||||
|
homo.ResetState();
|
||||||
|
}
|
||||||
|
optionBrowser2.SetState(STATE_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = optionBrowser2.GetClickedOption();
|
||||||
|
|
||||||
switch (ret)
|
switch (ret)
|
||||||
{
|
{
|
||||||
@ -2059,31 +2272,121 @@ int GameSettings(struct discHdr * header)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//the uninstall menu
|
if(saveBtn.GetState() == STATE_CLICKED)
|
||||||
if (pagetodisplay==2){
|
|
||||||
for (int j=0;j<13;j++)
|
|
||||||
{
|
{
|
||||||
options3.SetName(j,NULL);
|
|
||||||
options3.SetValue(j,NULL);
|
if(isInserted(bootDevice)) {
|
||||||
|
if (CFG_save_game_opt(header->id))
|
||||||
|
{
|
||||||
|
// if language has changed, reload titles
|
||||||
|
int opt_langnew = 0;
|
||||||
|
game_cfg = CFG_get_game_opt(header->id);
|
||||||
|
if (game_cfg) opt_langnew = game_cfg->language;
|
||||||
|
if (Settings.titlesOverride==1 && opt_lang != opt_langnew)
|
||||||
|
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
|
||||||
|
// titles are refreshed in menu.cpp as soon as this function returns
|
||||||
|
WindowPrompt(tr("Successfully Saved"), 0, tr("OK"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WindowPrompt(tr("Save Failed"), 0, tr("OK"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
|
||||||
}
|
}
|
||||||
options3.SetName(0,"%s", tr("Uninstall Game"));
|
|
||||||
options3.SetName(1,"%s", tr("Default Gamesettings"));
|
|
||||||
options3.SetName(2,"%s", tr("Reset Playcounter"));
|
|
||||||
options3.SetName(3,"%s", tr("Delete Boxart"));
|
|
||||||
options3.SetName(4,"%s", tr("Delete Discart"));
|
|
||||||
options3.SetName(5,"%s", tr("Delete CheatTxt"));
|
|
||||||
|
|
||||||
|
saveBtn.ResetState();
|
||||||
|
optionBrowser2.SetFocus(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
||||||
|
while(optionBrowser2.GetEffect() > 0) usleep(50);
|
||||||
|
MainButton1.ResetState();
|
||||||
|
break;
|
||||||
|
w.Remove(&saveBtn);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(MainButton2.GetState() == STATE_CLICKED) {
|
||||||
|
char ID[7];
|
||||||
|
snprintf (ID,sizeof(ID),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||||
|
CheatMenu(ID);
|
||||||
|
MainButton2.ResetState();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(MainButton3.GetState() == STATE_CLICKED) {
|
||||||
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
||||||
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
||||||
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
||||||
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
||||||
|
while(MainButton3.GetEffect() > 0) usleep(50);
|
||||||
|
HaltGui();
|
||||||
|
w.Remove(&MainButton1);
|
||||||
|
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.SetName(0,"%s", tr("Uninstall Game"));
|
||||||
|
options2.SetName(1,"%s", tr("Reset Playcounter"));
|
||||||
|
options2.SetName(2,"%s", tr("Delete Boxart"));
|
||||||
|
options2.SetName(3,"%s", tr("Delete Discart"));
|
||||||
|
options2.SetName(4,"%s", tr("Delete CheatTxt"));
|
||||||
|
for(int i = 0; i <= MAXOPTIONS-1; i++) options2.SetValue(i, NULL);
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
|
optionBrowser2.SetClickable(true);
|
||||||
|
ResumeGui();
|
||||||
|
|
||||||
|
VIDEO_WaitVSync ();
|
||||||
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
||||||
|
while(optionBrowser2.GetEffect() > 0) usleep(50);
|
||||||
|
|
||||||
|
while(!exit)
|
||||||
|
{
|
||||||
|
VIDEO_WaitVSync ();
|
||||||
|
|
||||||
|
if(backBtn.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
backBtn.ResetState();
|
||||||
|
exit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(shutdown == 1)
|
if(shutdown == 1)
|
||||||
Sys_Shutdown();
|
Sys_Shutdown();
|
||||||
if(reset == 1)
|
else if(reset == 1)
|
||||||
Sys_Reboot();
|
Sys_Reboot();
|
||||||
|
|
||||||
ret = optionBrowser3.GetClickedOption();
|
else if(homo.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
cfg_save_global();
|
||||||
|
optionBrowser2.SetState(STATE_DISABLED);
|
||||||
|
s32 thetimeofbg = bgMusic->GetPlayTime();
|
||||||
|
bgMusic->Stop();
|
||||||
|
choice = WindowExitPrompt(tr("Exit USB Loader GX?"),0, tr("Back to Loader"),tr("Wii Menu"),tr("Back"),0);
|
||||||
|
if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
|
||||||
|
{
|
||||||
|
bgMusic->Play();
|
||||||
|
} else {
|
||||||
|
bgMusic->PlayOggFile(Settings.ogg_path);
|
||||||
|
}
|
||||||
|
bgMusic->SetPlayTime(thetimeofbg);
|
||||||
|
SetVolumeOgg(255*(Settings.volume/100.0));
|
||||||
|
if(choice == 3) {
|
||||||
|
Sys_LoadMenu(); // Back to System Menu
|
||||||
|
} else if (choice == 2) {
|
||||||
|
Sys_BackToLoader();
|
||||||
|
} else {
|
||||||
|
homo.ResetState();
|
||||||
|
}
|
||||||
|
optionBrowser2.SetState(STATE_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = optionBrowser2.GetClickedOption();
|
||||||
|
|
||||||
int choice1;
|
int choice1;
|
||||||
char tmp[200];
|
char tmp[200];
|
||||||
@ -2110,11 +2413,73 @@ int GameSettings(struct discHdr * header)
|
|||||||
}
|
}
|
||||||
else if (choice1 == 0)
|
else if (choice1 == 0)
|
||||||
{
|
{
|
||||||
optionBrowser3.SetFocus(1);
|
optionBrowser2.SetFocus(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
choice1 = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel"));
|
int result;
|
||||||
|
result = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel"));
|
||||||
|
if(result == 1) {
|
||||||
|
if(isInserted(bootDevice)) {
|
||||||
|
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
||||||
|
if (game_num) {
|
||||||
|
favoritevar = game_num->favorite;
|
||||||
|
playcount = game_num->count;
|
||||||
|
} else {
|
||||||
|
favoritevar = 0;
|
||||||
|
playcount = 0;
|
||||||
|
}
|
||||||
|
playcount = 0;
|
||||||
|
CFG_save_game_num(header->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
|
||||||
|
snprintf(tmp,sizeof(tmp),"%s%c%c%c%c%c%c.png", Settings.covers_path, header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||||
|
|
||||||
|
choice1 = WindowPrompt(tr("Delete"),tmp,tr("Yes"),tr("No"));
|
||||||
|
if(choice1==1)
|
||||||
|
{
|
||||||
|
if(checkfile(tmp))
|
||||||
|
remove(tmp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
|
||||||
|
snprintf(tmp,sizeof(tmp),"%s%c%c%c%c%c%c.png", Settings.disc_path, header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||||
|
|
||||||
|
choice1 = WindowPrompt(tr("Delete"),tmp,tr("Yes"),tr("No"));
|
||||||
|
if(choice1==1)
|
||||||
|
{
|
||||||
|
if(checkfile(tmp))
|
||||||
|
remove(tmp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
|
||||||
|
snprintf(tmp,sizeof(tmp),"%s%c%c%c%c%c%c.txt", Settings.TxtCheatcodespath, header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||||
|
|
||||||
|
choice1 = WindowPrompt(tr("Delete"),tmp,tr("Yes"),tr("No"));
|
||||||
|
if(choice1==1)
|
||||||
|
{
|
||||||
|
if(checkfile(tmp))
|
||||||
|
remove(tmp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
||||||
|
while(optionBrowser2.GetEffect() > 0) usleep(50);
|
||||||
|
pageToDisplay = 1;
|
||||||
|
MainButton3.ResetState();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(MainButton4.GetState() == STATE_CLICKED) {
|
||||||
|
|
||||||
|
int choice1 = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel"));
|
||||||
if(choice1 == 1) {
|
if(choice1 == 1) {
|
||||||
videoChoice = Settings.video;
|
videoChoice = Settings.video;
|
||||||
viChoice = Settings.vpatch;
|
viChoice = Settings.vpatch;
|
||||||
@ -2140,124 +2505,63 @@ int GameSettings(struct discHdr * header)
|
|||||||
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
|
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
|
||||||
// titles are refreshed in menu.cpp as soon as this function returns
|
// titles are refreshed in menu.cpp as soon as this function returns
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pageToDisplay = 1;
|
||||||
|
MainButton4.ResetState();
|
||||||
break;
|
break;
|
||||||
case 2:
|
}
|
||||||
int result;
|
|
||||||
result = WindowPrompt(tr("Are you sure?"),0,tr("Yes"),tr("Cancel"));
|
|
||||||
if(result == 1) {
|
if(shutdown == 1)
|
||||||
if(isInserted(bootDevice)) {
|
Sys_Shutdown();
|
||||||
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
if(reset == 1)
|
||||||
if (game_num) {
|
Sys_Reboot();
|
||||||
favoritevar = game_num->favorite;
|
|
||||||
playcount = game_num->count;
|
if(backBtn.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
menu = MENU_DISCLIST;
|
||||||
|
pageToDisplay = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(homo.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
cfg_save_global();
|
||||||
|
optionBrowser2.SetState(STATE_DISABLED);
|
||||||
|
s32 thetimeofbg = bgMusic->GetPlayTime();
|
||||||
|
bgMusic->Stop();
|
||||||
|
choice = WindowExitPrompt(tr("Exit USB Loader GX?"),0, tr("Back to Loader"),tr("Wii Menu"),tr("Back"),0);
|
||||||
|
if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path))
|
||||||
|
{
|
||||||
|
bgMusic->Play();
|
||||||
} else {
|
} else {
|
||||||
favoritevar = 0;
|
bgMusic->PlayOggFile(Settings.ogg_path);
|
||||||
playcount = 0;
|
|
||||||
}
|
}
|
||||||
playcount = 0;
|
bgMusic->SetPlayTime(thetimeofbg);
|
||||||
CFG_save_game_num(header->id);
|
SetVolumeOgg(255*(Settings.volume/100.0));
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
|
|
||||||
snprintf(tmp,sizeof(tmp),"%s%c%c%c%c%c%c.png", Settings.covers_path, header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
if(choice == 3)
|
||||||
|
|
||||||
choice1 = WindowPrompt(tr("Delete"),tmp,tr("Yes"),tr("No"));
|
|
||||||
if(choice1==1)
|
|
||||||
{
|
{
|
||||||
if(checkfile(tmp))
|
Sys_LoadMenu(); // Back to System Menu
|
||||||
remove(tmp);
|
} else if (choice == 2) {
|
||||||
}
|
Sys_BackToLoader();
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
|
|
||||||
snprintf(tmp,sizeof(tmp),"%s%c%c%c%c%c%c.png", Settings.disc_path, header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
|
||||||
|
|
||||||
choice1 = WindowPrompt(tr("Delete"),tmp,tr("Yes"),tr("No"));
|
|
||||||
if(choice1==1)
|
|
||||||
{
|
|
||||||
if(checkfile(tmp))
|
|
||||||
remove(tmp);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
|
|
||||||
snprintf(tmp,sizeof(tmp),"%s%c%c%c%c%c%c.txt", Settings.TxtCheatcodespath, header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
|
||||||
|
|
||||||
choice1 = WindowPrompt(tr("Delete"),tmp,tr("Yes"),tr("No"));
|
|
||||||
if(choice1==1)
|
|
||||||
{
|
|
||||||
if(checkfile(tmp))
|
|
||||||
remove(tmp);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(saveBtn.GetState() == STATE_CLICKED)
|
|
||||||
{
|
|
||||||
// if(isSdInserted()) {
|
|
||||||
if(isInserted(bootDevice)) {
|
|
||||||
if (CFG_save_game_opt(header->id))
|
|
||||||
{
|
|
||||||
// if language has changed, reload titles
|
|
||||||
int opt_langnew = 0;
|
|
||||||
game_cfg = CFG_get_game_opt(header->id);
|
|
||||||
if (game_cfg) opt_langnew = game_cfg->language;
|
|
||||||
if (Settings.titlesOverride==1 && opt_lang != opt_langnew)
|
|
||||||
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, reload titles, do not keep in memory
|
|
||||||
// titles are refreshed in menu.cpp as soon as this function returns
|
|
||||||
WindowPrompt(tr("Successfully Saved"), 0, tr("OK"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WindowPrompt(tr("Save Failed"), 0, tr("OK"));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
|
homo.ResetState();
|
||||||
}
|
}
|
||||||
|
optionBrowser2.SetState(STATE_DEFAULT);
|
||||||
saveBtn.ResetState();
|
|
||||||
optionBrowser3.SetFocus(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cancelBtn.GetState() == STATE_CLICKED)
|
|
||||||
{
|
|
||||||
exit = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deleteBtn.GetState() == STATE_CLICKED)
|
|
||||||
{
|
|
||||||
|
|
||||||
pagetodisplay++;
|
|
||||||
deleteBtnTxt.SetText(tr("Settings"));
|
|
||||||
optionBrowser3.SetScrollbar(0);
|
|
||||||
optionBrowser3.SetOffset(0);
|
|
||||||
if (pagetodisplay>2)
|
|
||||||
{
|
|
||||||
pagetodisplay=1;
|
|
||||||
deleteBtnTxt.SetText(tr("Uninstall Menu"));
|
|
||||||
optionBrowser3.SetScrollbar(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteBtn.ResetState();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GCTBtn.GetState() == STATE_CLICKED) {
|
|
||||||
char ID[7];
|
|
||||||
snprintf (ID,sizeof(ID),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
|
||||||
CheatMenu(ID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
w.SetEffect(EFFECT_FADE, -20);
|
||||||
|
while(w.GetEffect()>0) usleep(50);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
mainWindow->Remove(&w);
|
|
||||||
ResumeGui();
|
|
||||||
|
|
||||||
|
mainWindow->RemoveAll();
|
||||||
|
mainWindow->Append(bgImg);
|
||||||
|
|
||||||
|
ResumeGui();
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
@ -1745,8 +1745,10 @@ void CFG_Load(void)
|
|||||||
//moved this to the HDD wait screen to avoid the garbled green screen while it is loading *maybe*
|
//moved this to the HDD wait screen to avoid the garbled green screen while it is loading *maybe*
|
||||||
//OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
|
//OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
|
||||||
// loaded after database to override database titles with custom titles
|
// loaded after database to override database titles with custom titles
|
||||||
snprintf(pathname, sizeof(pathname), "%stitles.txt", Settings.titlestxt_path);
|
|
||||||
cfg_parsefile(pathname, &title_set);
|
//took out this titles.txt shit because it is useless now. teh xml has all the titles in it
|
||||||
|
//snprintf(pathname, sizeof(pathname), "%stitles.txt", Settings.titlestxt_path);
|
||||||
|
//cfg_parsefile(pathname, &title_set);
|
||||||
|
|
||||||
// cfg_parsearg(argc, argv);
|
// cfg_parsearg(argc, argv);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define SVN_REV "649:652M"
|
#define SVN_REV "653M"
|
||||||
|
|
||||||
const char *GetRev()
|
const char *GetRev()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user