mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
*Added Block IOS Reload option to GameSettings (which was in our Loader all the time since i implemented 222 and wasn't used lol)
NOTE: This Block IOS Reload option enables games to work that don't usually work due to IOS Reloads. This option works ONLY if you boot your Loader in 222 and boot the game in 222/223)
This commit is contained in:
parent
2a35194fba
commit
1ab0f813e2
@ -51,6 +51,7 @@ snprintf(LANGUAGE.BacktoLoader, sizeof(LANGUAGE.BacktoLoader), "Back to Loader")
|
||||
snprintf(LANGUAGE.BacktoWiiMenu, sizeof(LANGUAGE.BacktoWiiMenu), "Back to Wii Menu");
|
||||
snprintf(LANGUAGE.BootStandard, sizeof(LANGUAGE.BootStandard), "Boot/Standard");
|
||||
snprintf(LANGUAGE.Both, sizeof(LANGUAGE.Both), "Both");
|
||||
snprintf(LANGUAGE.Blockiosreload, sizeof(LANGUAGE.Blockiosreload), "Block IOS Reload");
|
||||
snprintf(LANGUAGE.Cantcreatedirectory, sizeof(LANGUAGE.Cantcreatedirectory), "Can't create directory");
|
||||
snprintf(LANGUAGE.Cancel, sizeof(LANGUAGE.Cancel), "Cancel");
|
||||
snprintf(LANGUAGE.Cantbeformated, sizeof(LANGUAGE.Cantbeformated), "Can't be formated");
|
||||
@ -373,6 +374,10 @@ void language_set(char *name, char *val)
|
||||
strcopy(LANGUAGE.BootStandard, val, sizeof(LANGUAGE.BootStandard));
|
||||
return;
|
||||
}
|
||||
if (strcmp(name, "Blockiosreload") == 0) {
|
||||
strcopy(LANGUAGE.Blockiosreload, val, sizeof(LANGUAGE.Blockiosreload));
|
||||
return;
|
||||
}
|
||||
if (strcmp(name, "Both") == 0) {
|
||||
strcopy(LANGUAGE.Both, val, sizeof(LANGUAGE.Both));
|
||||
return;
|
||||
|
@ -47,6 +47,7 @@ struct LANGUAGE
|
||||
char BacktoWiiMenu[50];
|
||||
char BootStandard[50];
|
||||
char Both[35];
|
||||
char Blockiosreload[60];
|
||||
char Cantcreatedirectory[50];
|
||||
char Cancel[20];
|
||||
char Cantbeformated[50];
|
||||
|
@ -152,7 +152,7 @@ UpdateGUI (void *arg)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (Settings.screensaver)
|
||||
{
|
||||
case 1:
|
||||
@ -173,10 +173,10 @@ UpdateGUI (void *arg)
|
||||
case 6:
|
||||
WPad_SetIdleTime(3600);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
return NULL;
|
||||
@ -215,8 +215,8 @@ static int MenuDiscList()
|
||||
int selectImg1 = 0;
|
||||
char ID[4];
|
||||
char IDfull[7];
|
||||
|
||||
//SCREENSAVER
|
||||
|
||||
//SCREENSAVER
|
||||
//WPad_SetIdleTime(300); //needs the time in seconds
|
||||
int check = 0; //to skip the first cycle when wiimote isn't completely connected
|
||||
|
||||
@ -1332,16 +1332,16 @@ static int MenuDiscList()
|
||||
}
|
||||
}
|
||||
}
|
||||
// to skip the first call of windowScreensaver at startup when wiimote is not connected
|
||||
// to skip the first call of windowScreensaver at startup when wiimote is not connected
|
||||
if(IsWpadConnected()){check = 1;}
|
||||
|
||||
// screensaver is called when wiimote shuts down, depending on the wiimotet idletime
|
||||
|
||||
// screensaver is called when wiimote shuts down, depending on the wiimotet idletime
|
||||
if(!IsWpadConnected() && check == 1)
|
||||
{
|
||||
WindowScreensaver();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HaltGui();
|
||||
mainWindow->RemoveAll();
|
||||
mainWindow->Append(bgImg);
|
||||
@ -1781,8 +1781,8 @@ int MainMenu(int menu)
|
||||
|
||||
int currentMenu = menu;
|
||||
char imgPath[100];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef HW_RVL
|
||||
snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path);
|
||||
@ -1844,8 +1844,8 @@ int MainMenu(int menu)
|
||||
currentMenu = MenuCheck();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ExitGUIThreads();
|
||||
@ -1878,6 +1878,7 @@ int MainMenu(int menu)
|
||||
iosChoice = game_cfg->ios;
|
||||
countrystrings = game_cfg->patchcountrystrings;
|
||||
alternatedol = game_cfg->loadalternatedol;
|
||||
reloadblock = game_cfg->iosreloadblock;
|
||||
} else {
|
||||
videoChoice = Settings.video;
|
||||
languageChoice = Settings.language;
|
||||
@ -1891,6 +1892,7 @@ int MainMenu(int menu)
|
||||
fix002 = Settings.error002;
|
||||
countrystrings = Settings.patchcountrystrings;
|
||||
alternatedol = off;
|
||||
reloadblock = off;
|
||||
}
|
||||
int ios2;
|
||||
switch(iosChoice) {
|
||||
@ -1926,6 +1928,11 @@ int MainMenu(int menu)
|
||||
SDCard_deInit();
|
||||
USBDevice_deInit();
|
||||
|
||||
if(reloadblock == on && (IOS_GetVersion() == 222 || IOS_GetVersion() == 223)) {
|
||||
patch_cios_data();
|
||||
mload_close();
|
||||
}
|
||||
|
||||
u8 errorfixer002 = 0;
|
||||
switch(fix002)
|
||||
{
|
||||
|
@ -184,6 +184,7 @@ int mload_set_ES_ioctlv_vector(void *starlet_addr);
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------*/
|
||||
int load_ehc_module();
|
||||
int patch_cios_data();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -575,7 +575,7 @@ int MenuSettings()
|
||||
else if (Settings.screensaver == 4) options2.SetValue(11,"20 min");
|
||||
else if (Settings.screensaver == 5) options2.SetValue(11,"30 min");
|
||||
else if (Settings.screensaver == 6) options2.SetValue(11,"1 hour");
|
||||
|
||||
|
||||
if(backBtn.GetState() == STATE_CLICKED)
|
||||
{
|
||||
backBtn.ResetState();
|
||||
@ -694,7 +694,7 @@ int MenuSettings()
|
||||
case 11:
|
||||
Settings.screensaver++;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
||||
@ -1481,7 +1481,7 @@ int MenuSettings()
|
||||
WindowPrompt(LANGUAGE.Dolpathchange,LANGUAGE.Consoleshouldbeunlockedtomodifyit,LANGUAGE.ok,0,0,0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/** If not godmode don't let him inside **/
|
||||
@ -1725,7 +1725,7 @@ int GameSettings(struct discHdr * header)
|
||||
strncat(gameName, "...", 3);
|
||||
}
|
||||
|
||||
customOptionList options3(11);
|
||||
customOptionList options3(12);
|
||||
options3.SetName(0,"%s", LANGUAGE.VideoMode);
|
||||
options3.SetName(1,"%s", LANGUAGE.VIDTVPatch);
|
||||
options3.SetName(2,"%s", LANGUAGE.Language);
|
||||
@ -1735,7 +1735,8 @@ int GameSettings(struct discHdr * header)
|
||||
options3.SetName(6,"%s", LANGUAGE.Error002fix);
|
||||
options3.SetName(7,"%s", LANGUAGE.Patchcountrystrings);
|
||||
options3.SetName(8,"%s", LANGUAGE.Alternatedol);
|
||||
options3.SetName(9,"%s", LANGUAGE.Defaultgamesettings);
|
||||
options3.SetName(9,"%s", LANGUAGE.Blockiosreload);
|
||||
options3.SetName(10,"%s", LANGUAGE.Defaultgamesettings);
|
||||
|
||||
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);
|
||||
@ -1824,6 +1825,7 @@ int GameSettings(struct discHdr * header)
|
||||
fix002 = game_cfg->errorfix002;
|
||||
countrystrings = game_cfg->patchcountrystrings;
|
||||
alternatedol = game_cfg->loadalternatedol;
|
||||
reloadblock = game_cfg->iosreloadblock;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1840,6 +1842,7 @@ int GameSettings(struct discHdr * header)
|
||||
fix002 = Settings.error002;
|
||||
countrystrings = Settings.patchcountrystrings;
|
||||
alternatedol = off;
|
||||
reloadblock = off;
|
||||
}
|
||||
|
||||
int opt_lang = languageChoice; // backup language setting
|
||||
@ -1894,7 +1897,10 @@ int GameSettings(struct discHdr * header)
|
||||
if (alternatedol == on) options3.SetValue(8,LANGUAGE.ON);
|
||||
else if (alternatedol == off) options3.SetValue(8,LANGUAGE.OFF);
|
||||
|
||||
options3.SetValue(9, NULL);
|
||||
if (reloadblock == on) options3.SetValue(9,LANGUAGE.ON);
|
||||
else if (reloadblock == off) options3.SetValue(9,LANGUAGE.OFF);
|
||||
|
||||
options3.SetValue(10, NULL);
|
||||
|
||||
if(shutdown == 1)
|
||||
Sys_Shutdown();
|
||||
@ -1933,6 +1939,9 @@ int GameSettings(struct discHdr * header)
|
||||
alternatedol = (alternatedol+1) % 2;
|
||||
break;
|
||||
case 9:
|
||||
reloadblock = (reloadblock+1) % 2;
|
||||
break;
|
||||
case 10:
|
||||
int choice = WindowPrompt(LANGUAGE.Areyousure,0,LANGUAGE.Yes,LANGUAGE.Cancel,0,0);
|
||||
if(choice == 1) {
|
||||
videoChoice = Settings.video;
|
||||
@ -1942,6 +1951,7 @@ int GameSettings(struct discHdr * header)
|
||||
fix002 = Settings.error002;
|
||||
countrystrings = Settings.patchcountrystrings;
|
||||
alternatedol = off;
|
||||
reloadblock = off;
|
||||
if(Settings.cios == ios222) {
|
||||
iosChoice = i222;
|
||||
} else {
|
||||
@ -2000,7 +2010,7 @@ int GameSettings(struct discHdr * header)
|
||||
LANGUAGE.Yes,LANGUAGE.Cancel,0,0);
|
||||
|
||||
if (choice == 1)
|
||||
{
|
||||
{
|
||||
CFG_forget_game_opt(header->id);
|
||||
CFG_forget_game_num(header->id);
|
||||
ret = WBFS_RemoveGame(header->id);
|
||||
|
@ -28,6 +28,7 @@ u8 viChoice = 0;
|
||||
u8 iosChoice = 0;
|
||||
u8 parentalcontrolChoice = 0;
|
||||
u8 fix002 = 0;
|
||||
u8 reloadblock = 0;
|
||||
u8 countrystrings = 0;
|
||||
u8 alternatedol = 0;
|
||||
u8 xflip = 0;
|
||||
@ -1132,6 +1133,7 @@ void cfg_set_game_opt(struct Game_CFG *game, u8 *id)
|
||||
game->ios = iosChoice;
|
||||
game->parentalcontrol = parentalcontrolChoice;
|
||||
game->errorfix002 = fix002;
|
||||
game->iosreloadblock = reloadblock;
|
||||
game->patchcountrystrings = countrystrings;
|
||||
game->loadalternatedol = alternatedol;
|
||||
}
|
||||
@ -1292,6 +1294,11 @@ void game_set(char *name, char *val)
|
||||
game->errorfix002 = opt_c;
|
||||
}
|
||||
}
|
||||
if (strcmp("iosreloadblock", opt_name) == 0) {
|
||||
if (sscanf(opt_val, "%hd", &opt_c) == 1) {
|
||||
game->iosreloadblock = opt_c;
|
||||
}
|
||||
}
|
||||
if (strcmp("patchcountrystrings", opt_name) == 0) {
|
||||
if (sscanf(opt_val, "%hd", &opt_c) == 1) {
|
||||
game->patchcountrystrings = opt_c;
|
||||
@ -1447,6 +1454,7 @@ bool cfg_save_games()
|
||||
fprintf(f, "ios:%d; ", cfg_game[i].ios);
|
||||
fprintf(f, "pctrl:%d; ", cfg_game[i].parentalcontrol);
|
||||
fprintf(f, "errorfix002:%d; ", cfg_game[i].errorfix002);
|
||||
fprintf(f, "iosreloadblock:%d; ", cfg_game[i].iosreloadblock);
|
||||
fprintf(f, "patchcountrystrings:%d; ", cfg_game[i].patchcountrystrings);
|
||||
fprintf(f, "loadalternatedol:%d;\n", cfg_game[i].loadalternatedol);
|
||||
}
|
||||
|
@ -155,6 +155,7 @@ extern u8 iosChoice;
|
||||
extern u8 faveChoice;
|
||||
extern u8 parentalcontrolChoice;
|
||||
extern u8 fix002;
|
||||
extern u8 reloadblock;
|
||||
extern u8 countrystrings;
|
||||
extern u8 alternatedol;
|
||||
extern u8 xflip;
|
||||
@ -176,6 +177,7 @@ struct Game_CFG
|
||||
u8 ios;
|
||||
u8 parentalcontrol;
|
||||
u8 errorfix002;
|
||||
u8 iosreloadblock;
|
||||
u8 loadalternatedol;
|
||||
u8 patchcountrystrings;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user