when in neek2o offer option to enter real NAND

This commit is contained in:
Christopher Roy Bratusek 2012-04-09 17:05:27 +02:00
parent 939688875f
commit c86936c869
3 changed files with 33 additions and 0 deletions

Binary file not shown.

View File

@ -15,6 +15,7 @@ extern GuiWindow * mainWindow;
extern void ResumeGui();
extern void HaltGui();
extern bool goneek2o;
extern bool gorealnand;
int priicheck = 0;
@ -53,6 +54,7 @@ loaderPrompt()
GuiImageData btn(Theme.button);
GuiImage nandemuImg(&btn);
GuiImage neek2oImg(&btn);
GuiImage realnandImg(&btn);
GuiImage priiloaderImg(&btn);
GuiImage backImg(&btn);
@ -60,6 +62,7 @@ loaderPrompt()
GuiImageData btn_over(Theme.button_focus);
GuiImage nandemuImgOver(&btn_over);
GuiImage neek2oImgOver(&btn_over);
GuiImage realnandImgOver(&btn);
GuiImage priiloaderImgOver(&btn_over);
GuiImage backImgOver(&btn_over);
@ -81,6 +84,15 @@ loaderPrompt()
neek2o.SetImageOver(&neek2oImgOver);
neek2o.SetTrigger(&trigA);
GuiText realnandTxt(tr("Enter real NAND"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255});
GuiButton realnand(btn.GetWidth(), btn.GetHeight());
realnand.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
realnand.SetPosition(0, 90);
realnand.SetLabel(&realnandTxt);
realnand.SetImage(&realnandImg);
realnand.SetImageOver(&realnandImgOver);
realnand.SetTrigger(&trigA);
GuiText priiloaderTxt(tr("Launch Priiloader"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255});
GuiButton priiloader(btn.GetWidth(), btn.GetHeight());
priiloader.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
@ -134,6 +146,13 @@ loaderPrompt()
priiloader.SetPosition(0, 140);
}
}
else
{
realnand.SetPosition(0, 90);
promptWindow.Append(&realnand);
priiloader.SetPosition(0, 140);
}
if(get_priiloader() == 1)
promptWindow.Append(&priiloader);
@ -164,6 +183,13 @@ loaderPrompt()
stop = true;
}
if(realnand.GetState() == STATE_CLICKED)
{
gorealnand = true;
menu = MENU_EXIT;
stop = true;
}
if(priiloader.GetState() == STATE_CLICKED)
{
set_priiloader(2);

View File

@ -63,6 +63,7 @@ bool boothomebrew = false;
bool boot_buffer = false;
bool wiiload = false;
bool goneek2o = false;
bool gorealnand = false;
bool runaway = false;
bool gecko_connected;
@ -288,6 +289,12 @@ main(int argc, char *argv[])
boot_neek2o();
}
if(gorealnand)
{
//ExitApp();
SYS_ResetSystem(SYS_RESTART, 0, 0);
}
if(PowerOff == SYS_RETURNTOMENU)
{
*(vu32*)0x8132FFFB = 0x50756E65;