homebrewfilter/installer/source/main.cpp

51 lines
897 B
C++
Raw Permalink Normal View History

2011-10-15 17:31:29 +02:00
#include <malloc.h>
#include <wiiuse/wpad.h>
#include <wupc/wupc.h>
#include <runtimeiospatch.h>
2011-10-15 17:31:29 +02:00
#include "menu.h"
#include "video.h"
#include "wad.h"
#include "getios.h"
2011-10-15 17:31:29 +02:00
//---------------------------------------------------------------------------------
int main(int argc, char **argv) {
//---------------------------------------------------------------------------------
// Initialise the video system
VIDEO_Init();
Video_SetMode();
PAD_Init();
WUPC_Init();
WPAD_Init();
if(AHBPROT_DISABLED)
IosPatch_RUNTIME(true, false, false, true);
else
IOS_ReloadIOS(236);
2011-10-15 17:31:29 +02:00
menu();
signed_blob *p_tmd = NULL;
u32 len;
s32 ret;
ret = GetTMD(0x0001000154484246LL, &p_tmd, &len);
if(ret < 0)
{
*(vu32*)0x8132FFFB = 0x50756E65;
DCFlushRange((void*)0x8132FFFB, 4);
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
}
else
{
WII_LaunchTitle(0x0001000154484246);
}
2011-10-15 17:31:29 +02:00
return 0;
}