mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 03:09:15 +01:00
* remove all onlinefix stuff and replaced with a permanentfix (without IOS-reload)
This commit is contained in:
parent
1079b110a7
commit
f31c19b989
@ -183,7 +183,6 @@ snprintf(LANGUAGE.OFF, sizeof(LANGUAGE.OFF), "OFF");
|
||||
snprintf(LANGUAGE.OfficialSite, sizeof(LANGUAGE.OfficialSite), "Official Site");
|
||||
snprintf(LANGUAGE.ON, sizeof(LANGUAGE.ON), "ON");
|
||||
snprintf(LANGUAGE.OnlyInstall, sizeof(LANGUAGE.OnlyInstall), "Only for Install");
|
||||
snprintf(LANGUAGE.Onlinefix, sizeof(LANGUAGE.Onlinefix), "Online fix");
|
||||
snprintf(LANGUAGE.Parentalcontrol, sizeof(LANGUAGE.Parentalcontrol), "Parental Control");
|
||||
snprintf(LANGUAGE.Partition, sizeof(LANGUAGE.Partition), "Partition");
|
||||
snprintf(LANGUAGE.Password, sizeof(LANGUAGE.Password), "Password");
|
||||
@ -906,10 +905,6 @@ void language_set(char *name, char *val)
|
||||
strcopy(LANGUAGE.ON, val, sizeof(LANGUAGE.ON));
|
||||
return;
|
||||
}
|
||||
if (strcmp(name, "Onlinefix") == 0) {
|
||||
strcopy(LANGUAGE.Onlinefix, val, sizeof(LANGUAGE.Onlinefix));
|
||||
return;
|
||||
}
|
||||
if (strcmp(name, "Parentalcontrol") == 0) {
|
||||
strcopy(LANGUAGE.Parentalcontrol, val, sizeof(LANGUAGE.Parentalcontrol));
|
||||
return;
|
||||
|
@ -182,7 +182,6 @@ struct LANGUAGE
|
||||
char ok[30];
|
||||
char ON[30];
|
||||
char OnlyInstall[50];
|
||||
char Onlinefix[50];
|
||||
char Parentalcontrol[50];
|
||||
char Partition[50];
|
||||
char Password[50];
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h> //CLOCK
|
||||
#include <time.h>
|
||||
#include <ogc/machine/processor.h>
|
||||
|
||||
#include "libwiigui/gui.h"
|
||||
#include "libwiigui/gui_gamegrid.h"
|
||||
@ -1834,7 +1835,6 @@ int MainMenu(int menu)
|
||||
ocarinaChoice = game_cfg->ocarina;
|
||||
viChoice = game_cfg->vipatch;
|
||||
fix002 = game_cfg->errorfix002;
|
||||
onlinefix = game_cfg->onlinegame;
|
||||
iosChoice = game_cfg->ios;
|
||||
countrystrings = game_cfg->patchcountrystrings;
|
||||
alternatedol = game_cfg->loadalternatedol;
|
||||
@ -1849,7 +1849,6 @@ int MainMenu(int menu)
|
||||
iosChoice = i249;
|
||||
}
|
||||
fix002 = Settings.error002;
|
||||
onlinefix = off;
|
||||
countrystrings = Settings.patchcountrystrings;
|
||||
alternatedol = off;
|
||||
}
|
||||
@ -1872,12 +1871,25 @@ int MainMenu(int menu)
|
||||
break;
|
||||
}
|
||||
|
||||
if(IOS_GetVersion() != ios2 || (IsNetworkInit() == true && onlinefix == on)) {
|
||||
ret = Sys_IosReload(ios2);
|
||||
if(ret < 0) {
|
||||
Sys_IosReload(249);
|
||||
}
|
||||
}
|
||||
bool onlinefix = IsNetworkInit();
|
||||
if(onlinefix && IOS_GetVersion() == ios2) {
|
||||
s32 kd_fd, ret;
|
||||
STACK_ALIGN(u8, kd_buf, 0x20, 32);
|
||||
|
||||
kd_fd = IOS_Open("/dev/net/kd/request", 0);
|
||||
if (kd_fd >= 0) {
|
||||
ret = IOS_Ioctl(kd_fd, 7, NULL, 0, kd_buf, 0x20);
|
||||
if(ret >= 0)
|
||||
onlinefix = false; // fixed no IOS reload needed
|
||||
IOS_Close(kd_fd);
|
||||
}
|
||||
}
|
||||
if(IOS_GetVersion() != ios2 || onlinefix == true) {
|
||||
ret = Sys_IosReload(ios2);
|
||||
if(ret < 0) {
|
||||
Sys_IosReload(249);
|
||||
}
|
||||
}
|
||||
ret = Disc_SetUSB(header->id);
|
||||
if(ret < 0) Sys_BackToLoader();
|
||||
ret = Disc_Open();
|
||||
|
@ -1718,10 +1718,9 @@ int GameSettings(struct discHdr * header)
|
||||
options3.SetName(4, "IOS");
|
||||
options3.SetName(5,"%s", LANGUAGE.Parentalcontrol);
|
||||
options3.SetName(6,"%s", LANGUAGE.Error002fix);
|
||||
options3.SetName(7,"%s", LANGUAGE.Onlinefix);
|
||||
options3.SetName(8,"%s", LANGUAGE.Patchcountrystrings);
|
||||
options3.SetName(9,"%s", LANGUAGE.Alternatedol);
|
||||
options3.SetName(10,"%s", LANGUAGE.Defaultgamesettings);
|
||||
options3.SetName(7,"%s", LANGUAGE.Patchcountrystrings);
|
||||
options3.SetName(8,"%s", LANGUAGE.Alternatedol);
|
||||
options3.SetName(9,"%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);
|
||||
@ -1808,7 +1807,6 @@ int GameSettings(struct discHdr * header)
|
||||
iosChoice = game_cfg->ios;
|
||||
parentalcontrolChoice = game_cfg->parentalcontrol;
|
||||
fix002 = game_cfg->errorfix002;
|
||||
onlinefix = game_cfg->onlinegame;
|
||||
countrystrings = game_cfg->patchcountrystrings;
|
||||
alternatedol = game_cfg->loadalternatedol;
|
||||
}
|
||||
@ -1825,7 +1823,6 @@ int GameSettings(struct discHdr * header)
|
||||
}
|
||||
parentalcontrolChoice = 0;
|
||||
fix002 = Settings.error002;
|
||||
onlinefix = off;
|
||||
countrystrings = Settings.patchcountrystrings;
|
||||
alternatedol = off;
|
||||
}
|
||||
@ -1876,16 +1873,13 @@ int GameSettings(struct discHdr * header)
|
||||
if (fix002 == on) options3.SetValue(6,LANGUAGE.ON);
|
||||
else if (fix002 == off) options3.SetValue(6,LANGUAGE.OFF);
|
||||
|
||||
if (onlinefix == on) options3.SetValue(7,LANGUAGE.ON);
|
||||
else if (onlinefix == off) options3.SetValue(7,LANGUAGE.OFF);
|
||||
if (countrystrings == on) options3.SetValue(7,LANGUAGE.ON);
|
||||
else if (countrystrings == off) options3.SetValue(7,LANGUAGE.OFF);
|
||||
|
||||
if (countrystrings == on) options3.SetValue(8,LANGUAGE.ON);
|
||||
else if (countrystrings == off) options3.SetValue(8,LANGUAGE.OFF);
|
||||
if (alternatedol == on) options3.SetValue(8,LANGUAGE.ON);
|
||||
else if (alternatedol == off) options3.SetValue(8,LANGUAGE.OFF);
|
||||
|
||||
if (alternatedol == on) options3.SetValue(9,LANGUAGE.ON);
|
||||
else if (alternatedol == off) options3.SetValue(9,LANGUAGE.OFF);
|
||||
|
||||
options3.SetValue(10, NULL);
|
||||
options3.SetValue(9, NULL);
|
||||
|
||||
if(shutdown == 1)
|
||||
Sys_Shutdown();
|
||||
@ -1918,15 +1912,12 @@ int GameSettings(struct discHdr * header)
|
||||
fix002 = (fix002+1) % 2;
|
||||
break;
|
||||
case 7:
|
||||
onlinefix = (onlinefix+1) % 2;
|
||||
break;
|
||||
case 8:
|
||||
countrystrings = (countrystrings+1) % 2;
|
||||
break;
|
||||
case 9:
|
||||
case 8:
|
||||
alternatedol = (alternatedol+1) % 2;
|
||||
break;
|
||||
case 10:
|
||||
case 9:
|
||||
int choice = WindowPrompt(LANGUAGE.Areyousure,0,LANGUAGE.Yes,LANGUAGE.Cancel,0,0);
|
||||
if(choice == 1) {
|
||||
videoChoice = Settings.video;
|
||||
@ -1934,7 +1925,6 @@ int GameSettings(struct discHdr * header)
|
||||
languageChoice = Settings.language;
|
||||
ocarinaChoice = Settings.ocarina;
|
||||
fix002 = Settings.error002;
|
||||
onlinefix = off;
|
||||
countrystrings = Settings.patchcountrystrings;
|
||||
alternatedol = off;
|
||||
if(Settings.cios == ios222) {
|
||||
|
@ -30,7 +30,6 @@ u8 parentalcontrolChoice = 0;
|
||||
u8 fix002 = 0;
|
||||
u8 countrystrings = 0;
|
||||
u8 alternatedol = 0;
|
||||
u8 onlinefix = 0;
|
||||
u8 xflip = 0;
|
||||
u8 sort = 0;
|
||||
u8 fave = 0;
|
||||
@ -1127,7 +1126,6 @@ void cfg_set_game_opt(struct Game_CFG *game, u8 *id)
|
||||
game->errorfix002 = fix002;
|
||||
game->patchcountrystrings = countrystrings;
|
||||
game->loadalternatedol = alternatedol;
|
||||
game->onlinegame = onlinefix;
|
||||
}
|
||||
|
||||
struct Game_NUM* cfg_get_game_num(u8 *id)
|
||||
@ -1295,11 +1293,6 @@ void game_set(char *name, char *val)
|
||||
game->loadalternatedol = opt_c;
|
||||
}
|
||||
}
|
||||
if (strcmp("onlinegame", opt_name) == 0) {
|
||||
if (sscanf(opt_val, "%hd", &opt_c) == 1) {
|
||||
game->onlinegame = opt_c;
|
||||
}
|
||||
}
|
||||
}
|
||||
// next opt
|
||||
if (np) p = np + 1; else p = NULL;
|
||||
@ -1447,7 +1440,6 @@ bool cfg_save_games()
|
||||
fprintf(f, "errorfix002:%d; ", cfg_game[i].errorfix002);
|
||||
fprintf(f, "patchcountrystrings:%d; ", cfg_game[i].patchcountrystrings);
|
||||
fprintf(f, "loadalternatedol:%d; ", cfg_game[i].loadalternatedol);
|
||||
fprintf(f, "onlinegame:%d;\n", cfg_game[i].onlinegame);
|
||||
}
|
||||
fprintf(f, "# END\n");
|
||||
fclose(f);
|
||||
|
@ -157,7 +157,6 @@ extern u8 parentalcontrolChoice;
|
||||
extern u8 fix002;
|
||||
extern u8 countrystrings;
|
||||
extern u8 alternatedol;
|
||||
extern u8 onlinefix;
|
||||
extern u8 xflip;
|
||||
extern u8 qboot;
|
||||
extern u8 sort;
|
||||
@ -179,7 +178,6 @@ struct Game_CFG
|
||||
u8 errorfix002;
|
||||
u8 loadalternatedol;
|
||||
u8 patchcountrystrings;
|
||||
u8 onlinegame;
|
||||
};
|
||||
struct Game_NUM
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user