mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
*Fixed GameSettings not being saved right
*Moved the WC24 Shutdown to networkop.cpp
This commit is contained in:
parent
f31c19b989
commit
0d0d54ea66
@ -11,7 +11,6 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h> //CLOCK
|
||||
#include <time.h>
|
||||
#include <ogc/machine/processor.h>
|
||||
|
||||
#include "libwiigui/gui.h"
|
||||
#include "libwiigui/gui_gamegrid.h"
|
||||
@ -27,7 +26,7 @@
|
||||
#include "prompts/gameinfo.h"
|
||||
#include "mload/mload.h"
|
||||
#include "patches/patchcode.h"
|
||||
#include "network/updater.h"
|
||||
#include "network/networkops.h"
|
||||
#include "menu.h"
|
||||
#include "audio.h"
|
||||
#include "input.h"
|
||||
@ -1871,19 +1870,7 @@ int MainMenu(int menu)
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
bool onlinefix = ShutdownWC24();
|
||||
if(IOS_GetVersion() != ios2 || onlinefix == true) {
|
||||
ret = Sys_IosReload(ios2);
|
||||
if(ret < 0) {
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ogcsys.h>
|
||||
#include <ogc/machine/processor.h>
|
||||
|
||||
#include "prompts/PromptWindows.h"
|
||||
#include "settings/cfg.h"
|
||||
@ -58,6 +59,27 @@ char * GetNetworkIP(void)
|
||||
return IP;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Get network IP
|
||||
***************************************************************************/
|
||||
bool ShutdownWC24()
|
||||
{
|
||||
bool onlinefix = IsNetworkInit();
|
||||
if(onlinefix) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
return onlinefix;
|
||||
}
|
||||
|
||||
s32 network_request(const char * request)
|
||||
{
|
||||
char buf[1024];
|
@ -1,9 +1,10 @@
|
||||
#ifndef _UPDATER_H_
|
||||
#define _UPDATER_H_
|
||||
#ifndef _NETWORKOPS_H_
|
||||
#define _NETWORKOPS_H_
|
||||
|
||||
void Initialize_Network(void);
|
||||
bool IsNetworkInit(void);
|
||||
char * GetNetworkIP(void);
|
||||
bool ShutdownWC24();
|
||||
s32 network_request(const char * request);
|
||||
s32 network_read(u8 *buf, u32 len);
|
||||
s32 download_request(const char * url);
|
@ -13,7 +13,7 @@
|
||||
#include "language/language.h"
|
||||
#include "libwiigui/gui.h"
|
||||
#include "libwiigui/gui_diskcover.h"
|
||||
#include "network/updater.h"
|
||||
#include "network/networkops.h"
|
||||
#include "network/http.h"
|
||||
#include "mload/mload.h"
|
||||
#include "fatmounter.h"
|
||||
|
@ -1439,7 +1439,7 @@ bool cfg_save_games()
|
||||
fprintf(f, "pctrl:%d; ", cfg_game[i].parentalcontrol);
|
||||
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, "loadalternatedol:%d;\n", cfg_game[i].loadalternatedol);
|
||||
}
|
||||
fprintf(f, "# END\n");
|
||||
fclose(f);
|
||||
|
Loading…
Reference in New Issue
Block a user