mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-24 11:39:21 +01:00
add IOS whitelist, reload if found. display warning if not.
This commit is contained in:
parent
0df185faa6
commit
2213e5510e
@ -3850,8 +3850,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
|
||||||
|
@ -213,13 +213,22 @@ void setFrameTimerMethod()
|
|||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
bool SaneIOS()
|
bool SaneIOS()
|
||||||
{
|
{
|
||||||
bool res = false;
|
bool SupportedIOS(u32 ios)
|
||||||
u32 num_titles=0;
|
{
|
||||||
u32 tmd_size;
|
if(ios == 58 || ios == 61)
|
||||||
u32 ios = IOS_GetVersion();
|
return true;
|
||||||
|
|
||||||
if(ios > 200)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SaneIOS(u32 ios)
|
||||||
|
{
|
||||||
|
bool res = false;
|
||||||
|
u32 num_titles=0;
|
||||||
|
u32 tmd_size;
|
||||||
|
|
||||||
|
if(ios > 200)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (ES_GetNumTitles(&num_titles) < 0)
|
if (ES_GetNumTitles(&num_titles) < 0)
|
||||||
return false;
|
return false;
|
||||||
@ -328,6 +337,16 @@ void USBGeckoOutput()
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
u32 ios = IOS_GetVersion();
|
||||||
|
|
||||||
|
if(!SupportedIOS(ios))
|
||||||
|
{
|
||||||
|
s32 preferred = IOS_GetPreferredVersion();
|
||||||
|
|
||||||
|
if(SupportedIOS(preferred))
|
||||||
|
IOS_ReloadIOS(preferred);
|
||||||
|
}
|
||||||
|
|
||||||
//USBGeckoOutput(); // uncomment to enable USB gecko output
|
//USBGeckoOutput(); // uncomment to enable USB gecko output
|
||||||
__exception_setreload(8);
|
__exception_setreload(8);
|
||||||
|
|
||||||
|
@ -112,7 +112,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;
|
||||||
|
Loading…
Reference in New Issue
Block a user