mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 03:09:15 +01:00
c7411c9200
*optimized use of memory (sizes over 30kb go to mem2 now first till it runs out) *avoid use of mem2 area used on IOS_Reload (first 2 mb) *fixed bug in aiff sound playback. breaked some banner sounds *fixed boot of We Dare again (stupid channels added in the pattern again :P) *unmount the usb partition used for nand emu and remount it after activating nand emu (fat32 cache flush)
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
/****************************************************************************
|
|
* 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>
|
|
#include <locale.h>
|
|
#include <wiiuse/wpad.h>
|
|
#include <di/di.h>
|
|
#include <sys/iosupport.h>
|
|
|
|
#include "video.h"
|
|
#include "menu/menus.h"
|
|
#include "memory/mem2.h"
|
|
#include "wad/nandtitle.h"
|
|
#include "StartUpProcess.h"
|
|
#include "sys.h"
|
|
|
|
extern "C"
|
|
{
|
|
extern s32 MagicPatches(s32);
|
|
void __exception_setreload(int t);
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
__exception_setreload(20);
|
|
// activate magic access rights
|
|
MagicPatches(1);
|
|
// init video
|
|
InitVideo();
|
|
// video frame buffers must be in mem1
|
|
MEM2_init(48);
|
|
// init gecko
|
|
InitGecko();
|
|
// redirect stdout and stderr to gecko
|
|
USBGeckoOutput();
|
|
NandTitles.Get();
|
|
setlocale(LC_ALL, "en.UTF-8");
|
|
|
|
if(StartUpProcess::Run(argc, argv) < 0)
|
|
return -1;
|
|
|
|
MainMenu(MENU_DISCLIST);
|
|
return 0;
|
|
}
|