mirror of
https://github.com/dborth/fceugx.git
synced 2025-02-04 03:06:22 +01:00
add IOS whitelist, reload if found. display warning if not.
This commit is contained in:
parent
475e0f92a6
commit
6e6b0b8d65
@ -188,12 +188,19 @@ static void ipl_set_config(unsigned char c)
|
|||||||
* IOS Check
|
* IOS Check
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
bool SaneIOS()
|
bool SupportedIOS(u32 ios)
|
||||||
|
{
|
||||||
|
if(ios == 58 || ios == 61)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SaneIOS(u32 ios)
|
||||||
{
|
{
|
||||||
bool res = false;
|
bool res = false;
|
||||||
u32 num_titles=0;
|
u32 num_titles=0;
|
||||||
u32 tmd_size;
|
u32 tmd_size;
|
||||||
u32 ios = IOS_GetVersion();
|
|
||||||
|
|
||||||
if(ios > 200)
|
if(ios > 200)
|
||||||
return false;
|
return false;
|
||||||
@ -309,7 +316,17 @@ void USBGeckoOutput()
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
USBGeckoOutput(); // uncomment to enable USB gecko output
|
u32 ios = IOS_GetVersion();
|
||||||
|
|
||||||
|
if(!SupportedIOS(ios))
|
||||||
|
{
|
||||||
|
s32 preferred = IOS_GetPreferredVersion();
|
||||||
|
|
||||||
|
if(SupportedIOS(preferred))
|
||||||
|
IOS_ReloadIOS(preferred);
|
||||||
|
}
|
||||||
|
|
||||||
|
//USBGeckoOutput(); // uncomment to enable USB gecko output
|
||||||
__exception_setreload(8);
|
__exception_setreload(8);
|
||||||
|
|
||||||
#ifdef HW_DOL
|
#ifdef HW_DOL
|
||||||
|
@ -111,7 +111,8 @@ struct SGCSettings{
|
|||||||
|
|
||||||
void ExitApp();
|
void ExitApp();
|
||||||
void ShutdownWii();
|
void ShutdownWii();
|
||||||
bool SaneIOS();
|
bool SupportedIOS(u32 ios);
|
||||||
|
bool SaneIOS(u32 ios);
|
||||||
extern struct SGCSettings GCSettings;
|
extern struct SGCSettings GCSettings;
|
||||||
extern int ScreenshotRequested;
|
extern int ScreenshotRequested;
|
||||||
extern int ConfigRequested;
|
extern int ConfigRequested;
|
||||||
|
@ -3890,8 +3890,15 @@ MainMenu (int menu)
|
|||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
static bool checkIOS = true;
|
static bool checkIOS = true;
|
||||||
|
|
||||||
if(checkIOS && !SaneIOS())
|
if(checkIOS)
|
||||||
ErrorPrompt("The current IOS has been altered (fake-signed). Functionality and/or stability may be adversely affected.");
|
{
|
||||||
|
u32 ios = IOS_GetVersion();
|
||||||
|
|
||||||
|
if(!SupportedIOS(ios))
|
||||||
|
ErrorPrompt("The current IOS is unsupported. Functionality and/or stability may be adversely affected.");
|
||||||
|
else if(!SaneIOS(ios))
|
||||||
|
ErrorPrompt("The current IOS has been altered (fake-signed). Functionality and/or stability may be adversely affected.");
|
||||||
|
}
|
||||||
|
|
||||||
checkIOS = false;
|
checkIOS = false;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user