sharpii/WadInstaller_Source/source/menu.c
mzolob@gmail.com a6d7600859 Updated to 1.6 - SendWad now supports AHBPROT (use '-ahb')
- IP can now be saved in an environmental variable (SharpiiIP) for both SendWad and SendDol (manually or with '-saveip')
                - Pointless aster eggs are fun!
                - Code cleanup/bug fixes
2011-11-08 04:59:31 +00:00

54 lines
896 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ogcsys.h>
#include <unistd.h>
#include "fat.h"
#include "restart.h"
#include "title.h"
#include "utils.h"
#include "video.h"
#include "wad.h"
#include "wpad.h"
#include "ahbprot.h"
/* Constants */
#define CIOS_VERSION 249
void LoadSelectedIOS()
{
u8 selectedIOS = Wad_SelectIOS();
s32 ret;
if (selectedIOS == 0) {
if (HAVE_AHBPROT) {
ret = patchSetAHBPROT();
if (ret > 0) {
ret = runtimePatchApply();
if (ret > 0) {
printf("\nUsing AHBPROT\n");
return;
}
}
printf("\nAHBPROT FAILED!\n");
}
}
ret = IOS_ReloadIOS(selectedIOS);
if (ret<0)
{
printf("\nUsing default IOS\n");
} else
{
printf("\nUsing selected IOS %d\n", selectedIOS);
}
}
void Menu_Loop(void)
{
Wad_InstallFromMemory();
}