mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 09:49:21 +01:00
*Added wiilight settings to turn on/off and install only (issue 211)
*Added DefaultSettings Button and a DefaultGameSettings Button. *Fixed OGG Menu to not codedump on path change and auto add '/' if not entered like on paths *Some small fixes
This commit is contained in:
parent
5cf5cd6ae7
commit
c6fdedb008
@ -862,6 +862,13 @@ void global_cfg_set(char *name, char *val)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(name, "wiilight") == 0) {
|
||||||
|
int i;
|
||||||
|
if (sscanf(val, "%d", &i) == 1) {
|
||||||
|
Settings.wiilight = i;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// split line to part1 delimiter part2
|
// split line to part1 delimiter part2
|
||||||
@ -1071,6 +1078,7 @@ bool cfg_save_global()// save global settings
|
|||||||
fprintf(f, "godmode = %d\n ", 0);
|
fprintf(f, "godmode = %d\n ", 0);
|
||||||
}
|
}
|
||||||
fprintf(f, "ogg_path = %s\n ", CFG.ogg_path);
|
fprintf(f, "ogg_path = %s\n ", CFG.ogg_path);
|
||||||
|
fprintf(f, "wiilight = %d\n ", Settings.wiilight);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
34
source/cfg.h
34
source/cfg.h
@ -278,35 +278,29 @@ enum {
|
|||||||
dvorak,
|
dvorak,
|
||||||
euro,
|
euro,
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
enum {
|
|
||||||
ParentalControlOff,
|
|
||||||
ParentalControlLevel1,
|
|
||||||
ParentalControlLevel2,
|
|
||||||
ParentalControlLevel3
|
|
||||||
};*/
|
|
||||||
|
|
||||||
struct SSettings {
|
struct SSettings {
|
||||||
int video;
|
int video;
|
||||||
int language;
|
int language;
|
||||||
int ocarina;
|
int ocarina;
|
||||||
int vpatch;
|
int vpatch;
|
||||||
int ios;
|
int ios;
|
||||||
int sinfo;
|
int sinfo;
|
||||||
int hddinfo;
|
int hddinfo;
|
||||||
int rumble;
|
int rumble;
|
||||||
int xflip;
|
int xflip;
|
||||||
int volume;
|
int volume;
|
||||||
int tooltips;
|
int tooltips;
|
||||||
char unlockCode[20];
|
char unlockCode[20];
|
||||||
int parentalcontrol;
|
int parentalcontrol;
|
||||||
int cios;
|
int cios;
|
||||||
int qboot;
|
int qboot;
|
||||||
int wsprompt;
|
int wsprompt;
|
||||||
int keyset;
|
int keyset;
|
||||||
int unicodefix;
|
int unicodefix;
|
||||||
int sort;
|
int sort;
|
||||||
int fave;
|
int fave;
|
||||||
|
int wiilight;
|
||||||
};
|
};
|
||||||
|
|
||||||
void CFG_LoadGlobal(void);
|
void CFG_LoadGlobal(void);
|
||||||
|
@ -77,6 +77,8 @@ snprintf(LANGUAGE.Doyouwanttoretryfor30secs, sizeof(LANGUAGE.Doyouwanttoretryfor
|
|||||||
snprintf(LANGUAGE.Downloadingfile, sizeof(LANGUAGE.Downloadingfile), "Downloading file:");
|
snprintf(LANGUAGE.Downloadingfile, sizeof(LANGUAGE.Downloadingfile), "Downloading file:");
|
||||||
snprintf(LANGUAGE.DownloadBoxartimage, sizeof(LANGUAGE.DownloadBoxartimage), "Download Boxart image?");
|
snprintf(LANGUAGE.DownloadBoxartimage, sizeof(LANGUAGE.DownloadBoxartimage), "Download Boxart image?");
|
||||||
snprintf(LANGUAGE.Downloadfinished, sizeof(LANGUAGE.Downloadfinished), "Download finished");
|
snprintf(LANGUAGE.Downloadfinished, sizeof(LANGUAGE.Downloadfinished), "Download finished");
|
||||||
|
snprintf(LANGUAGE.Defaultgamesettings, sizeof(LANGUAGE.Defaultgamesettings), "Default Gamesettings");
|
||||||
|
snprintf(LANGUAGE.Defaultsettings, sizeof(LANGUAGE.Defaultsettings), "Default Settings");
|
||||||
snprintf(LANGUAGE.Error, sizeof(LANGUAGE.Error), "Error !");
|
snprintf(LANGUAGE.Error, sizeof(LANGUAGE.Error), "Error !");
|
||||||
snprintf(LANGUAGE.hour, sizeof(LANGUAGE.hour), "Hour");
|
snprintf(LANGUAGE.hour, sizeof(LANGUAGE.hour), "Hour");
|
||||||
snprintf(LANGUAGE.Homemenu, sizeof(LANGUAGE.Homemenu), "HOME Menu");
|
snprintf(LANGUAGE.Homemenu, sizeof(LANGUAGE.Homemenu), "HOME Menu");
|
||||||
@ -150,6 +152,7 @@ snprintf(LANGUAGE.of, sizeof(LANGUAGE.of), "of");
|
|||||||
snprintf(LANGUAGE.OFF, sizeof(LANGUAGE.OFF), "OFF");
|
snprintf(LANGUAGE.OFF, sizeof(LANGUAGE.OFF), "OFF");
|
||||||
snprintf(LANGUAGE.OfficialSite, sizeof(LANGUAGE.OfficialSite), "Official Site");
|
snprintf(LANGUAGE.OfficialSite, sizeof(LANGUAGE.OfficialSite), "Official Site");
|
||||||
snprintf(LANGUAGE.ON, sizeof(LANGUAGE.ON), "ON");
|
snprintf(LANGUAGE.ON, sizeof(LANGUAGE.ON), "ON");
|
||||||
|
snprintf(LANGUAGE.OnlyInstall, sizeof(LANGUAGE.OnlyInstall), "Only for Install");
|
||||||
snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental control");
|
snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental control");
|
||||||
snprintf(LANGUAGE.Partition, sizeof(LANGUAGE.Partition), "Partition");
|
snprintf(LANGUAGE.Partition, sizeof(LANGUAGE.Partition), "Partition");
|
||||||
snprintf(LANGUAGE.Password, sizeof(LANGUAGE.Password), "Password");
|
snprintf(LANGUAGE.Password, sizeof(LANGUAGE.Password), "Password");
|
||||||
@ -208,6 +211,7 @@ snprintf(LANGUAGE.Waiting, sizeof(LANGUAGE.Waiting), "Waiting...");
|
|||||||
snprintf(LANGUAGE.WaitingforUSBDevice, sizeof(LANGUAGE.WaitingforUSBDevice), "Waiting for USB Device");
|
snprintf(LANGUAGE.WaitingforUSBDevice, sizeof(LANGUAGE.WaitingforUSBDevice), "Waiting for USB Device");
|
||||||
snprintf(LANGUAGE.WidescreenFix, sizeof(LANGUAGE.WidescreenFix), "Widescreen Fix");
|
snprintf(LANGUAGE.WidescreenFix, sizeof(LANGUAGE.WidescreenFix), "Widescreen Fix");
|
||||||
snprintf(LANGUAGE.WiiMenu, sizeof(LANGUAGE.WiiMenu), "Wii Menu");
|
snprintf(LANGUAGE.WiiMenu, sizeof(LANGUAGE.WiiMenu), "Wii Menu");
|
||||||
|
snprintf(LANGUAGE.Wiilight, sizeof(LANGUAGE.Wiilight), "Wiilight");
|
||||||
snprintf(LANGUAGE.WrongPassword, sizeof(LANGUAGE.WrongPassword), "Wrong Password");
|
snprintf(LANGUAGE.WrongPassword, sizeof(LANGUAGE.WrongPassword), "Wrong Password");
|
||||||
snprintf(LANGUAGE.Yes, sizeof(LANGUAGE.Yes), "Yes");
|
snprintf(LANGUAGE.Yes, sizeof(LANGUAGE.Yes), "Yes");
|
||||||
snprintf(LANGUAGE.YoudonthavecIOS, sizeof(LANGUAGE.YoudonthavecIOS), "You don't have cIOS222");
|
snprintf(LANGUAGE.YoudonthavecIOS, sizeof(LANGUAGE.YoudonthavecIOS), "You don't have cIOS222");
|
||||||
@ -427,6 +431,14 @@ void language_set(char *name, char *val)
|
|||||||
strcopy(LANGUAGE.Downloadfinished, val, sizeof(LANGUAGE.Downloadfinished));
|
strcopy(LANGUAGE.Downloadfinished, val, sizeof(LANGUAGE.Downloadfinished));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcmp(name, "Defaultgamesettings") == 0) {
|
||||||
|
strcopy(LANGUAGE.Defaultgamesettings, val, sizeof(LANGUAGE.Defaultgamesettings));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strcmp(name, "Defaultsettings") == 0) {
|
||||||
|
strcopy(LANGUAGE.Defaultsettings, val, sizeof(LANGUAGE.Defaultsettings));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (strcmp(name, "Error") == 0) {
|
if (strcmp(name, "Error") == 0) {
|
||||||
strcopy(LANGUAGE.Error, val, sizeof(LANGUAGE.Error));
|
strcopy(LANGUAGE.Error, val, sizeof(LANGUAGE.Error));
|
||||||
return;
|
return;
|
||||||
@ -728,6 +740,10 @@ void language_set(char *name, char *val)
|
|||||||
strcopy(LANGUAGE.OfficialSite, val, sizeof(LANGUAGE.OfficialSite));
|
strcopy(LANGUAGE.OfficialSite, val, sizeof(LANGUAGE.OfficialSite));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcmp(name, "OnlyInstall") == 0) {
|
||||||
|
strcopy(LANGUAGE.OnlyInstall, val, sizeof(LANGUAGE.OnlyInstall));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (strcmp(name, "ON") == 0) {
|
if (strcmp(name, "ON") == 0) {
|
||||||
strcopy(LANGUAGE.ON, val, sizeof(LANGUAGE.ON));
|
strcopy(LANGUAGE.ON, val, sizeof(LANGUAGE.ON));
|
||||||
return;
|
return;
|
||||||
@ -956,6 +972,10 @@ void language_set(char *name, char *val)
|
|||||||
strcopy(LANGUAGE.WiiMenu, val, sizeof(LANGUAGE.WiiMenu));
|
strcopy(LANGUAGE.WiiMenu, val, sizeof(LANGUAGE.WiiMenu));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcmp(name, "Wiilight") == 0) {
|
||||||
|
strcopy(LANGUAGE.Wiilight, val, sizeof(LANGUAGE.Wiilight));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (strcmp(name, "WrongPassword") == 0) {
|
if (strcmp(name, "WrongPassword") == 0) {
|
||||||
strcopy(LANGUAGE.WrongPassword, val, sizeof(LANGUAGE.WrongPassword));
|
strcopy(LANGUAGE.WrongPassword, val, sizeof(LANGUAGE.WrongPassword));
|
||||||
return;
|
return;
|
||||||
|
@ -59,6 +59,8 @@ struct LANGUAGE
|
|||||||
char Downloadingfile[50];
|
char Downloadingfile[50];
|
||||||
char DownloadBoxartimage[50];
|
char DownloadBoxartimage[50];
|
||||||
char Downloadfinished[50];
|
char Downloadfinished[50];
|
||||||
|
char Defaultgamesettings[50];
|
||||||
|
char Defaultsettings[40];
|
||||||
char Error[30];
|
char Error[30];
|
||||||
char BOOTERROR[50];
|
char BOOTERROR[50];
|
||||||
char ErrorreadingDisc[50];
|
char ErrorreadingDisc[50];
|
||||||
@ -135,6 +137,7 @@ struct LANGUAGE
|
|||||||
char OfficialSite[50];
|
char OfficialSite[50];
|
||||||
char ok[30];
|
char ok[30];
|
||||||
char ON[30];
|
char ON[30];
|
||||||
|
char OnlyInstall[50];
|
||||||
char Parentalcontrol[50];
|
char Parentalcontrol[50];
|
||||||
char Partition[50];
|
char Partition[50];
|
||||||
char Password[50];
|
char Password[50];
|
||||||
@ -192,6 +195,7 @@ struct LANGUAGE
|
|||||||
char WaitingforUSBDevice[80];
|
char WaitingforUSBDevice[80];
|
||||||
char WidescreenFix[50];
|
char WidescreenFix[50];
|
||||||
char WiiMenu[50];
|
char WiiMenu[50];
|
||||||
|
char Wiilight[20];
|
||||||
char WrongPassword[50];
|
char WrongPassword[50];
|
||||||
char Yes[20];
|
char Yes[20];
|
||||||
char YoudonthavecIOS[70];
|
char YoudonthavecIOS[70];
|
||||||
|
@ -141,27 +141,6 @@ void GuiButton::SetSoundClick(GuiSound * snd)
|
|||||||
soundClick = snd;
|
soundClick = snd;
|
||||||
}
|
}
|
||||||
|
|
||||||
//No delay for now
|
|
||||||
/*
|
|
||||||
void GuiButton::SetToolTip(GuiImage* img, GuiText * txt, int x, int y)
|
|
||||||
{
|
|
||||||
LOCK(this);
|
|
||||||
if(img)
|
|
||||||
{
|
|
||||||
|
|
||||||
toolTip = img;
|
|
||||||
img->SetParent(this);
|
|
||||||
img->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
|
||||||
img->SetPosition(x,y);
|
|
||||||
if(txt)
|
|
||||||
{
|
|
||||||
toolTipTxt = txt;
|
|
||||||
txt->SetParent(img);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
void GuiButton::SetToolTip(GuiElement* tt, int x, int y, int h_align, int v_align)
|
void GuiButton::SetToolTip(GuiElement* tt, int x, int y, int h_align, int v_align)
|
||||||
{
|
{
|
||||||
LOCK(this);
|
LOCK(this);
|
||||||
@ -249,11 +228,6 @@ void GuiButton::Update(GuiTrigger * t)
|
|||||||
else if(parentElement && parentElement->GetState() == STATE_DISABLED)
|
else if(parentElement && parentElement->GetState() == STATE_DISABLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if(state != STATE_SELECTED && toolTip) {
|
|
||||||
// time2 = 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
// cursor
|
// cursor
|
||||||
if(t->wpad.ir.valid)
|
if(t->wpad.ir.valid)
|
||||||
|
@ -206,7 +206,6 @@ void GuiCustomOptionBrowser::SetFocus(int f)
|
|||||||
optionBtn[i]->ResetState();
|
optionBtn[i]->ResetState();
|
||||||
|
|
||||||
if(f == 1)
|
if(f == 1)
|
||||||
optionBtn[selectedItem]->ResetState();
|
|
||||||
optionBtn[selectedItem]->SetState(STATE_SELECTED);
|
optionBtn[selectedItem]->SetState(STATE_SELECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,31 +3,6 @@
|
|||||||
|
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "../disc.h"
|
#include "../disc.h"
|
||||||
/*
|
|
||||||
class GameBrowserList {
|
|
||||||
public:
|
|
||||||
GameBrowserList(int size) {
|
|
||||||
name = new char * [size];
|
|
||||||
|
|
||||||
for (int i = 0; i < size; i++)
|
|
||||||
{
|
|
||||||
name[i] = new char[50];
|
|
||||||
}
|
|
||||||
length = size;
|
|
||||||
};
|
|
||||||
~GameBrowserList(){
|
|
||||||
for (int i = 0; i < length; i++)
|
|
||||||
{
|
|
||||||
delete [] name[i];
|
|
||||||
}
|
|
||||||
delete [] name;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
int length;
|
|
||||||
char ** name;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
class GuiGameBrowser : public GuiElement
|
class GuiGameBrowser : public GuiElement
|
||||||
{
|
{
|
||||||
@ -69,22 +44,16 @@ class GuiGameBrowser : public GuiElement
|
|||||||
GuiImage * scrollbarImg;
|
GuiImage * scrollbarImg;
|
||||||
GuiImage * arrowDownImg;
|
GuiImage * arrowDownImg;
|
||||||
GuiImage * arrowDownOverImg;
|
GuiImage * arrowDownOverImg;
|
||||||
GuiImage * ttarrowUpImg;
|
|
||||||
GuiImage * ttarrowDownImg;
|
|
||||||
GuiImage * arrowUpImg;
|
GuiImage * arrowUpImg;
|
||||||
GuiImage * arrowUpOverImg;
|
GuiImage * arrowUpOverImg;
|
||||||
GuiImage * scrollbarBoxImg;
|
GuiImage * scrollbarBoxImg;
|
||||||
GuiImage * scrollbarBoxOverImg;
|
GuiImage * scrollbarBoxOverImg;
|
||||||
|
|
||||||
GuiText * ttarrowDownTxt;
|
|
||||||
GuiText * ttarrowUpTxt;
|
|
||||||
|
|
||||||
GuiImageData * bgGames;
|
GuiImageData * bgGames;
|
||||||
GuiImageData * bgGamesEntry;
|
GuiImageData * bgGamesEntry;
|
||||||
GuiImageData * scrollbar;
|
GuiImageData * scrollbar;
|
||||||
GuiImageData * arrowDown;
|
GuiImageData * arrowDown;
|
||||||
GuiImageData * arrowDownOver;
|
GuiImageData * arrowDownOver;
|
||||||
GuiImageData * ttarrow;
|
|
||||||
GuiImageData * arrowUp;
|
GuiImageData * arrowUp;
|
||||||
GuiImageData * arrowUpOver;
|
GuiImageData * arrowUpOver;
|
||||||
GuiImageData * scrollbarBox;
|
GuiImageData * scrollbarBox;
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "wpad.h"
|
#include "wpad.h"
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "fat.h"
|
||||||
|
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
@ -99,6 +100,7 @@ DefaultSettings()
|
|||||||
Settings.xflip = no;
|
Settings.xflip = no;
|
||||||
Settings.qboot = no;
|
Settings.qboot = no;
|
||||||
Settings.unicodefix = 0;
|
Settings.unicodefix = 0;
|
||||||
|
Settings.wiilight = 1;
|
||||||
|
|
||||||
CFG_LoadGlobal();
|
CFG_LoadGlobal();
|
||||||
}
|
}
|
||||||
@ -135,6 +137,8 @@ main(int argc, char *argv[])
|
|||||||
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fatInit(1, true);
|
||||||
|
|
||||||
SDCard_Init();
|
SDCard_Init();
|
||||||
|
|
||||||
Sys_Init();
|
Sys_Init();
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
extern struct SSettings Settings;
|
extern struct SSettings Settings;
|
||||||
|
|
||||||
void ExitApp();
|
void ExitApp();
|
||||||
|
void DefaultSettings();
|
||||||
extern int ExitRequested;
|
extern int ExitRequested;
|
||||||
extern FreeTypeGX *fontSystem;
|
extern FreeTypeGX *fontSystem;
|
||||||
extern bool netcheck;
|
extern bool netcheck;
|
||||||
|
133
source/menu.cpp
133
source/menu.cpp
@ -100,8 +100,9 @@ extern u8 reset;
|
|||||||
static vu32 *_wiilight_reg = (u32*)0xCD0000C0;
|
static vu32 *_wiilight_reg = (u32*)0xCD0000C0;
|
||||||
void wiilight(int enable){ // Toggle wiilight (thanks Bool for wiilight source)
|
void wiilight(int enable){ // Toggle wiilight (thanks Bool for wiilight source)
|
||||||
u32 val = (*_wiilight_reg&~0x20);
|
u32 val = (*_wiilight_reg&~0x20);
|
||||||
if(enable) val |= 0x20;
|
if(enable && Settings.wiilight) val |= 0x20;
|
||||||
*_wiilight_reg=val;}
|
*_wiilight_reg=val;
|
||||||
|
}
|
||||||
|
|
||||||
//Prototypes
|
//Prototypes
|
||||||
int WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, const char *btn3Label, const char *btn4Label);
|
int WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label, const char *btn3Label, const char *btn4Label);
|
||||||
@ -2636,6 +2637,7 @@ static int MenuInstall()
|
|||||||
|
|
||||||
sprintf(gametxt, "%s : %.2fGB", name, gamesize);
|
sprintf(gametxt, "%s : %.2fGB", name, gamesize);
|
||||||
|
|
||||||
|
wiilight(1);
|
||||||
choice = WindowPrompt(LANGUAGE.Continueinstallgame,gametxt,LANGUAGE.ok,LANGUAGE.Cancel,0,0);
|
choice = WindowPrompt(LANGUAGE.Continueinstallgame,gametxt,LANGUAGE.ok,LANGUAGE.Cancel,0,0);
|
||||||
|
|
||||||
if(choice == 1) {
|
if(choice == 1) {
|
||||||
@ -2647,6 +2649,7 @@ static int MenuInstall()
|
|||||||
sprintf(errortxt, "%s: %.2fGB, %s: %.2fGB",LANGUAGE.GameSize, gamesize, LANGUAGE.FreeSpace, freespace);
|
sprintf(errortxt, "%s: %.2fGB, %s: %.2fGB",LANGUAGE.GameSize, gamesize, LANGUAGE.FreeSpace, freespace);
|
||||||
choice = WindowPrompt(LANGUAGE.Notenoughfreespace,errortxt,LANGUAGE.ok, LANGUAGE.Return,0,0);
|
choice = WindowPrompt(LANGUAGE.Notenoughfreespace,errortxt,LANGUAGE.ok, LANGUAGE.Return,0,0);
|
||||||
if (choice == 1) {
|
if (choice == 1) {
|
||||||
|
wiilight(1);
|
||||||
ret = ProgressWindow(gametxt, name);
|
ret = ProgressWindow(gametxt, name);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
WindowPrompt (LANGUAGE.Installerror,0,LANGUAGE.Back,0,0,0);
|
WindowPrompt (LANGUAGE.Installerror,0,LANGUAGE.Back,0,0,0);
|
||||||
@ -2654,11 +2657,10 @@ static int MenuInstall()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
wiilight(1);
|
||||||
__Menu_GetEntries(); //get the entries again
|
__Menu_GetEntries(); //get the entries again
|
||||||
wiilight(1);
|
|
||||||
WindowPrompt (LANGUAGE.Successfullyinstalled,name,LANGUAGE.ok,0,0,0);
|
WindowPrompt (LANGUAGE.Successfullyinstalled,name,LANGUAGE.ok,0,0,0);
|
||||||
menu = MENU_DISCLIST;
|
menu = MENU_DISCLIST;
|
||||||
wiilight(0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2675,25 +2677,28 @@ static int MenuInstall()
|
|||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
__Menu_GetEntries(); //get the entries again
|
__Menu_GetEntries(); //get the entries again
|
||||||
wiilight(1);
|
|
||||||
WindowPrompt (LANGUAGE.Successfullyinstalled,name,LANGUAGE.ok,0,0,0);
|
WindowPrompt (LANGUAGE.Successfullyinstalled,name,LANGUAGE.ok,0,0,0);
|
||||||
menu = MENU_DISCLIST;
|
menu = MENU_DISCLIST;
|
||||||
wiilight(0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
menu = MENU_DISCLIST;
|
menu = MENU_DISCLIST;
|
||||||
wiilight(0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shutdown == 1)
|
if (shutdown == 1) {
|
||||||
|
wiilight(0);
|
||||||
Sys_Shutdown();
|
Sys_Shutdown();
|
||||||
if(reset == 1)
|
}
|
||||||
|
if(reset == 1) {
|
||||||
|
wiilight(0);
|
||||||
Sys_Reboot();
|
Sys_Reboot();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Turn off the WiiLight
|
||||||
|
wiilight(0);
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
|
||||||
@ -3189,7 +3194,7 @@ static int MenuDiscList()
|
|||||||
} else {
|
} else {
|
||||||
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtodownloadimages, LANGUAGE.ok, 0,0,0);
|
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtodownloadimages, LANGUAGE.ok, 0,0,0);
|
||||||
}
|
}
|
||||||
DownloadBtn.ResetState();
|
DownloadBtn.ResetState();
|
||||||
gameBrowser.SetFocus(1);
|
gameBrowser.SetFocus(1);
|
||||||
}//end download
|
}//end download
|
||||||
|
|
||||||
@ -3486,7 +3491,7 @@ static int MenuDiscList()
|
|||||||
{
|
{
|
||||||
|
|
||||||
returnHere = false;
|
returnHere = false;
|
||||||
wiilight(1);
|
if(Settings.wiilight != 2) wiilight(1);
|
||||||
choice = GameWindowPrompt();
|
choice = GameWindowPrompt();
|
||||||
header = &gameList[gameSelected]; //reset header
|
header = &gameList[gameSelected]; //reset header
|
||||||
|
|
||||||
@ -4108,10 +4113,10 @@ static int MenuSettings()
|
|||||||
sprintf(options2.name[2], "%s",LANGUAGE.keyboard);
|
sprintf(options2.name[2], "%s",LANGUAGE.keyboard);
|
||||||
sprintf(options2.name[3], "%s",LANGUAGE.Unicodefix);
|
sprintf(options2.name[3], "%s",LANGUAGE.Unicodefix);
|
||||||
sprintf(options2.name[4], "%s",LANGUAGE.Backgroundmusic);
|
sprintf(options2.name[4], "%s",LANGUAGE.Backgroundmusic);
|
||||||
sprintf(options2.name[5], " ");
|
sprintf(options2.name[5], "%s",LANGUAGE.Wiilight);
|
||||||
sprintf(options2.name[6], " ");
|
sprintf(options2.name[6], " ");
|
||||||
sprintf(options2.name[7], " ");
|
sprintf(options2.name[7], "%s",LANGUAGE.MP3Menu);
|
||||||
sprintf(options2.name[8], "%s",LANGUAGE.MP3Menu);
|
sprintf(options2.name[8], "%s",LANGUAGE.Defaultsettings);
|
||||||
|
|
||||||
}
|
}
|
||||||
while(menu == MENU_NONE)
|
while(menu == MENU_NONE)
|
||||||
@ -4513,8 +4518,8 @@ static int MenuSettings()
|
|||||||
Settings.keyset = 0;
|
Settings.keyset = 0;
|
||||||
if ( Settings.unicodefix > 2 )
|
if ( Settings.unicodefix > 2 )
|
||||||
Settings.unicodefix = 0;
|
Settings.unicodefix = 0;
|
||||||
//if ( Settings.sort > 2 )
|
if ( Settings.wiilight > 2 )
|
||||||
// Settings.sort = 0;
|
Settings.wiilight = 0;
|
||||||
|
|
||||||
if (strlen(CFG.titlestxt_path) < (9 + 3)) {
|
if (strlen(CFG.titlestxt_path) < (9 + 3)) {
|
||||||
sprintf(cfgtext, "%s", CFG.titlestxt_path);
|
sprintf(cfgtext, "%s", CFG.titlestxt_path);
|
||||||
@ -4556,10 +4561,13 @@ static int MenuSettings()
|
|||||||
sprintf(options2.value[4], "%s", cfgtext);
|
sprintf(options2.value[4], "%s", cfgtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(options2.value[5], " ");
|
if (Settings.wiilight == 0) sprintf (options2.value[5],"%s",LANGUAGE.OFF);
|
||||||
|
else if (Settings.wiilight == 1) sprintf (options2.value[5],"%s",LANGUAGE.ON);
|
||||||
|
else if (Settings.wiilight == 2) sprintf (options2.value[5],"%s",LANGUAGE.OnlyInstall);
|
||||||
|
|
||||||
sprintf(options2.value[6], " ");
|
sprintf(options2.value[6], " ");
|
||||||
sprintf(options2.value[7], " ");
|
sprintf(options2.value[7], "not working!");
|
||||||
sprintf(options2.value[8], "not working!");
|
sprintf(options2.value[8], " ");
|
||||||
|
|
||||||
ret = optionBrowser2.GetClickedOption();
|
ret = optionBrowser2.GetClickedOption();
|
||||||
|
|
||||||
@ -4662,14 +4670,30 @@ static int MenuSettings()
|
|||||||
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
|
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 5:
|
||||||
if(isSdInserted() == 1) {
|
Settings.wiilight++;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
if(isSdInserted()) {
|
||||||
menu = MENU_MP3;
|
menu = MENU_MP3;
|
||||||
pageToDisplay = 0;
|
pageToDisplay = 0;
|
||||||
} else {
|
} else {
|
||||||
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
|
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtousethatoption, LANGUAGE.ok, 0,0,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 8:
|
||||||
|
int choice = WindowPrompt(LANGUAGE.Areyousure, 0, LANGUAGE.Yes, LANGUAGE.Cancel, 0, 0);
|
||||||
|
if(choice == 1) {
|
||||||
|
if(isSdInserted()) {
|
||||||
|
remove("SD:/config/GXGlobal.cfg");
|
||||||
|
}
|
||||||
|
lang_default();
|
||||||
|
CFG_Load();
|
||||||
|
DefaultSettings();
|
||||||
|
menu = MENU_SETTINGS;
|
||||||
|
pageToDisplay = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4820,13 +4844,14 @@ int GameSettings(struct discHdr * header)
|
|||||||
strncat(gameName, "...", 3);
|
strncat(gameName, "...", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
customOptionList options3(6);
|
customOptionList options3(7);
|
||||||
sprintf(options3.name[0],"%s", LANGUAGE.VideoMode);
|
sprintf(options3.name[0],"%s", LANGUAGE.VideoMode);
|
||||||
sprintf(options3.name[1],"%s", LANGUAGE.VIDTVPatch);
|
sprintf(options3.name[1],"%s", LANGUAGE.VIDTVPatch);
|
||||||
sprintf(options3.name[2],"%s", LANGUAGE.Language);
|
sprintf(options3.name[2],"%s", LANGUAGE.Language);
|
||||||
sprintf(options3.name[3], "Ocarina");
|
sprintf(options3.name[3], "Ocarina");
|
||||||
sprintf(options3.name[4], "IOS");
|
sprintf(options3.name[4], "IOS");
|
||||||
sprintf(options3.name[5],"Parental Control");//sprintf(options3.name[5],"%s", LANGUAGE.addToFavorite);
|
sprintf(options3.name[5],"Parental Control");//sprintf(options3.name[5],"%s", LANGUAGE.addToFavorite);
|
||||||
|
sprintf(options3.name[6],"%s", LANGUAGE.Defaultgamesettings);
|
||||||
|
|
||||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
|
||||||
|
|
||||||
@ -4921,19 +4946,6 @@ int GameSettings(struct discHdr * header)
|
|||||||
mainWindow->Append(&optionBrowser3);
|
mainWindow->Append(&optionBrowser3);
|
||||||
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
//extern u8 favorite;
|
|
||||||
/*extern u16 count;
|
|
||||||
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
|
||||||
|
|
||||||
if (game_num)
|
|
||||||
{
|
|
||||||
faveChoice = game_num->favorite;
|
|
||||||
count = game_num->count;//count+=1;
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
faveChoice = no;}*/
|
|
||||||
|
|
||||||
|
|
||||||
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
|
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
|
||||||
|
|
||||||
@ -5004,6 +5016,8 @@ int GameSettings(struct discHdr * header)
|
|||||||
if(reset == 1)
|
if(reset == 1)
|
||||||
Sys_Reboot();
|
Sys_Reboot();
|
||||||
|
|
||||||
|
sprintf(options3.value[6]," ");
|
||||||
|
|
||||||
ret = optionBrowser3.GetClickedOption();
|
ret = optionBrowser3.GetClickedOption();
|
||||||
|
|
||||||
switch (ret)
|
switch (ret)
|
||||||
@ -5026,38 +5040,28 @@ int GameSettings(struct discHdr * header)
|
|||||||
case 5:
|
case 5:
|
||||||
parentalcontrolChoice = (parentalcontrolChoice + 1) % 4;
|
parentalcontrolChoice = (parentalcontrolChoice + 1) % 4;
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
int choice = WindowPrompt(LANGUAGE.Areyousure,0,LANGUAGE.Yes,LANGUAGE.Cancel,0,0);
|
||||||
|
if(choice == 1) {
|
||||||
|
videoChoice = discdefault;
|
||||||
|
viChoice = off;
|
||||||
|
languageChoice = ConsoleLangDefault;
|
||||||
|
ocarinaChoice = off;
|
||||||
|
if(Settings.cios == ios222) {
|
||||||
|
iosChoice = i222;
|
||||||
|
} else {
|
||||||
|
iosChoice = i249;
|
||||||
|
}
|
||||||
|
parentalcontrolChoice = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(saveBtn.GetState() == STATE_CLICKED)
|
if(saveBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(isSdInserted() == 1) {
|
if(isSdInserted() == 1) {
|
||||||
/*//////////save game play count////////////////
|
if (CFG_save_game_opt(header->id))
|
||||||
extern u8 favorite;
|
|
||||||
extern u8 count;
|
|
||||||
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
|
||||||
|
|
||||||
if (game_num)
|
|
||||||
{
|
|
||||||
favorite = game_num->favorite;
|
|
||||||
count = game_num->count;//count+=1;
|
|
||||||
|
|
||||||
}favorite = faveChoice;
|
|
||||||
|
|
||||||
if(isSdInserted() == 1) {
|
|
||||||
if (CFG_save_game_num(header->id))
|
|
||||||
{
|
|
||||||
//WindowPrompt(LANGUAGE.SuccessfullySaved, 0, LANGUAGE.ok, 0,0,0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WindowPrompt(LANGUAGE.SaveFailed, 0, LANGUAGE.ok, 0,0,0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
|
|
||||||
}
|
|
||||||
*////////////end save play count//////////////
|
|
||||||
if (CFG_save_game_opt(header->id))
|
|
||||||
{
|
{
|
||||||
WindowPrompt(LANGUAGE.SuccessfullySaved, 0, LANGUAGE.ok, 0,0,0);
|
WindowPrompt(LANGUAGE.SuccessfullySaved, 0, LANGUAGE.ok, 0,0,0);
|
||||||
}
|
}
|
||||||
@ -5428,14 +5432,17 @@ int MenuOGG()
|
|||||||
w.Append(&prevBtn);
|
w.Append(&prevBtn);
|
||||||
w.Append(&stopBtn);
|
w.Append(&stopBtn);
|
||||||
if ( result == 1 ) {
|
if ( result == 1 ) {
|
||||||
|
int len = (strlen(entered)-1);
|
||||||
|
if(entered[len] !='/')
|
||||||
|
strncat (entered, "/", 1);
|
||||||
strncpy(CFG.oggload_path, entered, sizeof(CFG.oggload_path));
|
strncpy(CFG.oggload_path, entered, sizeof(CFG.oggload_path));
|
||||||
WindowPrompt(LANGUAGE.Backgroundmusicpath,0,LANGUAGE.ok,0,0,0);
|
WindowPrompt(LANGUAGE.Backgroundmusicpath,0,LANGUAGE.ok,0,0,0);
|
||||||
if(isSdInserted() == 1) {
|
if(isSdInserted()) {
|
||||||
cfg_save_global();
|
|
||||||
if(!strcmp("", CFG.oggload_path)) {
|
if(!strcmp("", CFG.oggload_path)) {
|
||||||
sprintf(CFG.ogg_path, "notset");
|
sprintf(CFG.ogg_path, "notset");
|
||||||
bgMusic->Play();
|
bgMusic->Play();
|
||||||
}
|
}
|
||||||
|
//cfg_save_global();
|
||||||
menu = MENU_OGG;
|
menu = MENU_OGG;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user