From 34aaa034b8e2982c09cf441c91fb7b7f981c3c9e Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 30 Jan 2013 22:22:36 +0100 Subject: [PATCH] add return to Wii U menu in vWii versions --- installer/wad.vwii/0001000154484246.tmd | Bin 592 -> 592 bytes main/source/Prompts/prompt_end.cpp | 18 ++++++++++++++++++ main/source/main.cpp | 9 ++++++++- web/updates | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/installer/wad.vwii/0001000154484246.tmd b/installer/wad.vwii/0001000154484246.tmd index 9dcd76f702af422029c05e94c55befacb2181291..25a678d3bc7a491799d7fd07a703b1e7ef244a95 100644 GIT binary patch delta 31 ncmcb>a)D)oC6l;LLPKE#!*!2Fn<~FKWd~IHO#Y{RxI6^_z~T+S delta 31 ncmcb>a)D)oC6l;zal`u`5kZ3UwM!*_^R--CR-UhQTw)6V%|#7v diff --git a/main/source/Prompts/prompt_end.cpp b/main/source/Prompts/prompt_end.cpp index 82841e3..08bbc1b 100644 --- a/main/source/Prompts/prompt_end.cpp +++ b/main/source/Prompts/prompt_end.cpp @@ -9,6 +9,7 @@ extern bool runaway; extern bool restarthbf; +extern bool gowiiu; /*** Extern variables ***/ extern GuiWindow * mainWindow; @@ -45,12 +46,14 @@ endPrompt() GuiImageData btn(Theme.button); GuiImage systemmenuImg(&btn); GuiImage bootmiiImg(&btn); + GuiImage wiiuImg(&btn); GuiImage hbfImg(&btn); GuiImage shutdownImg(&btn); // Buttons over data GuiImageData btn_over(Theme.button_focus); GuiImage bootmiiImgOver(&btn_over); + GuiImage wiiuImgOver(&btn_over); GuiImage hbfImgOver(&btn_over); GuiImage systemmenuImgOver(&btn_over); GuiImage shutdownImgOver(&btn_over); @@ -67,6 +70,14 @@ endPrompt() bootmii.SetImage(&bootmiiImg); bootmii.SetImageOver(&bootmiiImgOver); bootmii.SetTrigger(&trigA); +#else + GuiText wiiuTxt(tr("Exit to Wii U menu"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255}); + GuiButton wiiu(btn.GetWidth(), btn.GetHeight()); + wiiu.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); + wiiu.SetPosition(0, 75); + wiiu.SetImage(&wiiuImg); + wiiu.SetImageOver(&wiiuImgOver); + wiiu.SetTrigger(&trigA); #endif GuiText hbfTxt(tr("Restart HBF"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3, 255}); GuiButton hbf(btn.GetWidth(), btn.GetHeight()); @@ -132,6 +143,13 @@ endPrompt() menu = MENU_EXIT; stop = true; } +#else + if(wiiu.GetState() == STATE_CLICKED) + { + gowiiu = true; + menu = MENU_EXIT; + stop = true; + } #endif if(hbf.GetState() == STATE_CLICKED) { diff --git a/main/source/main.cpp b/main/source/main.cpp index 7777716..7164585 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -65,6 +65,7 @@ bool wiiload = false; bool goneek2o = false; bool gorealnand = false; bool restarthbf = false; +bool gowiiu = false; bool updatehbf = false; bool gosegui = false; const char* segui_loc; @@ -310,7 +311,13 @@ main(int argc, char *argv[]) BootHomebrew (); } } -#ifndef VWII +#ifdef VWII + else if(gowiiu) + { + xprintf("Going into Wii U menu\n"); + WII_LaunchTitle(0x0001000248435641); + } +#else else if(get_priiloader() == 2) { xprintf("Entering magic key\n"); diff --git a/web/updates b/web/updates index 52ddbd9..7611cdc 100644 --- a/web/updates +++ b/web/updates @@ -1,6 +1,7 @@ //rev43: - added chinese translation and font file (thanks to kavid) - fixed downloading japanese font file from server +- add "Return to Wii U menu" in vWii versions //rev42: - changed default options: