diff --git a/source/menu.cpp b/source/menu.cpp index aa9a8c9..063caa1 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3850,8 +3850,15 @@ MainMenu (int menu) #ifdef HW_RVL static bool checkIOS = true; - if(checkIOS && !SaneIOS()) - ErrorPrompt("The current IOS has been altered (fake-signed). Functionality and/or stability may be adversely affected."); + if(checkIOS) + { + 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; #endif diff --git a/source/snes9xgx.cpp b/source/snes9xgx.cpp index ca60275..3e00914 100644 --- a/source/snes9xgx.cpp +++ b/source/snes9xgx.cpp @@ -213,13 +213,22 @@ void setFrameTimerMethod() #ifdef HW_RVL bool SaneIOS() { - bool res = false; - u32 num_titles=0; - u32 tmd_size; - u32 ios = IOS_GetVersion(); + bool SupportedIOS(u32 ios) + { + if(ios == 58 || ios == 61) + return true; - if(ios > 200) 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) return false; @@ -328,6 +337,16 @@ void USBGeckoOutput() int 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 __exception_setreload(8); diff --git a/source/snes9xgx.h b/source/snes9xgx.h index f108da1..50e64c3 100644 --- a/source/snes9xgx.h +++ b/source/snes9xgx.h @@ -112,7 +112,8 @@ struct SGCSettings{ void ExitApp(); void ShutdownWii(); -bool SaneIOS(); +bool SupportedIOS(u32 ios); +bool SaneIOS(u32 ios); extern struct SGCSettings GCSettings; extern int ScreenshotRequested; extern int ConfigRequested;