2009-09-30 19:10:58 -04:00
|
|
|
/****************************************************************************
|
|
|
|
* USB Loader GX Team
|
|
|
|
*
|
|
|
|
* Main loadup of the application
|
|
|
|
*
|
|
|
|
* libwiigui
|
|
|
|
* Tantric 2009
|
|
|
|
***************************************************************************/
|
|
|
|
#include <gccore.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/dir.h>
|
|
|
|
#include <ogcsys.h>
|
|
|
|
#include <unistd.h>
|
2009-10-15 11:13:13 -03:00
|
|
|
#include <locale.h>
|
2009-09-30 19:10:58 -04:00
|
|
|
#include <wiiuse/wpad.h>
|
2009-12-02 22:06:09 -03:00
|
|
|
#include <di/di.h>
|
|
|
|
#include <sys/iosupport.h>
|
2009-09-30 19:10:58 -04:00
|
|
|
|
|
|
|
#include "video.h"
|
2010-12-30 20:49:22 -03:00
|
|
|
#include "menu/menus.h"
|
2009-12-04 12:05:20 -03:00
|
|
|
#include "memory/mem2.h"
|
2010-09-18 19:04:39 -04:00
|
|
|
#include "wad/nandtitle.h"
|
2010-12-30 20:49:22 -03:00
|
|
|
#include "StartUpProcess.h"
|
|
|
|
#include "sys.h"
|
2009-10-20 08:46:55 -03:00
|
|
|
|
2010-10-28 06:00:52 -03:00
|
|
|
extern "C"
|
|
|
|
{
|
2011-01-14 12:39:42 -03:00
|
|
|
extern s32 MagicPatches(s32);
|
2010-11-28 12:31:08 -03:00
|
|
|
void __exception_setreload(int t);
|
2010-10-28 06:00:52 -03:00
|
|
|
}
|
|
|
|
|
2010-12-30 20:49:22 -03:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
MEM2_init(48);
|
|
|
|
__exception_setreload(20);
|
2011-01-14 12:39:42 -03:00
|
|
|
MagicPatches(1);
|
2010-12-30 20:49:22 -03:00
|
|
|
InitVideo();
|
|
|
|
InitGecko();
|
2011-01-12 16:30:04 -03:00
|
|
|
USBGeckoOutput();
|
2010-12-30 20:49:22 -03:00
|
|
|
NandTitles.Get();
|
|
|
|
setlocale(LC_ALL, "en.UTF-8");
|
2010-01-17 20:59:59 -03:00
|
|
|
|
2011-06-14 13:53:19 -04:00
|
|
|
if(StartUpProcess::Run(argc, argv) < 0)
|
|
|
|
return -1;
|
2009-09-30 19:10:58 -04:00
|
|
|
|
2010-10-27 16:50:48 -03:00
|
|
|
MainMenu(MENU_DISCLIST);
|
2009-09-30 19:10:58 -04:00
|
|
|
return 0;
|
|
|
|
}
|