s32 __attribute__((weak)) __IOS_LoadStartupIOS() { #if 0 int version; int res; res = __ES_Init(); if(res < 0) return res; version = IOS_GetPreferredVersion(); if(version < 0) { #ifdef DEBUG_IOS printf("GetPreferredVersion failed: %d\n",version); #endif __ES_Close(); return version; } #ifdef DEBUG_IOS printf("Loading startup IOS: %d\n",version); #endif res = __IOS_LaunchNewIOS(version); if(res < 0) return res; #endif return 0; }
int main(int argc, char *argv[]) { /* INITIALIZE */ #ifdef HW_RVL DI_UseCache(false); if (!__di_check_ahbprot()) { s32 preferred = IOS_GetPreferredVersion(); if (preferred == 58 || preferred == 61) IOS_ReloadIOS(preferred); else DI_LoadDVDX(true); } DI_Init(); // first #endif loadSettings(argc, argv); MenuContext *menu = new MenuContext(vmode); VIDEO_SetPostRetraceCallback (ScanPADSandReset); #ifndef WII DVD_Init(); #endif #ifdef DEBUGON //DEBUG_Init(GDBSTUB_DEVICE_TCP,GDBSTUB_DEF_TCPPORT); //Default port is 2828 DEBUG_Init(GDBSTUB_DEVICE_USB, 1); _break(); #endif control_info_init(); //Perform controller auto assignment at least once at startup. // Start up AESND (inited here because its used in SPU and CD) AESND_Init(); #ifdef HW_RVL // Initialize the network if the user has specified something in their SMB settings if(strlen(&smbShareName[0]) && strlen(&smbIpAddr[0])) { init_network_thread(); } #endif while (menu->isRunning()) {} // Shut down AESND AESND_Reset(); delete menu; return 0; }