From b6b1f99d85fa4ade4f47963e949e545b052b7367 Mon Sep 17 00:00:00 2001 From: Maschell Date: Mon, 25 Jul 2022 11:52:33 +0200 Subject: [PATCH] Update to use latest wut version --- Dockerfile | 4 ++-- source/BootUtils.cpp | 37 +++++++++++++++++-------------------- source/QuickStartUtils.cpp | 12 ++++-------- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index c0e87a1..83dc1d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM wiiuenv/devkitppc:20211229 +FROM wiiuenv/devkitppc:20220724 -COPY --from=wiiuenv/libiosuhax:20211008 /artifacts $DEVKITPRO +COPY --from=wiiuenv/libiosuhax:20220523 /artifacts $DEVKITPRO WORKDIR project \ No newline at end of file diff --git a/source/BootUtils.cpp b/source/BootUtils.cpp index 2e985a2..4b614b5 100644 --- a/source/BootUtils.cpp +++ b/source/BootUtils.cpp @@ -1,29 +1,26 @@ +#include "BootUtils.h" +#include "ACTAccountInfo.h" +#include "DrawUtils.h" +#include "MenuUtils.h" +#include "logger.h" #include +#include +#include +#include +#include #include #include #include #include -#include -#include - -#include "ACTAccountInfo.h" -#include "BootUtils.h" -#include "DrawUtils.h" -#include "MenuUtils.h" -#include "logger.h" - -#include -#include -#include #include #include #include +#include #include #include +#include #include -#include - void handleAccountSelection(); void bootWiiUMenu() { @@ -90,7 +87,7 @@ void handleAccountSelection() { nn::act::Finalize(); } -static void launchvWiiTitle(uint32_t titleId_low, uint32_t titleId_high) { +static void launchvWiiTitle(uint64_t titleId) { // we need to init kpad for cmpt KPADInit(); @@ -108,17 +105,17 @@ static void launchvWiiTitle(uint32_t titleId_low, uint32_t titleId_high) { void *dataBuffer = memalign(0x40, dataSize); - if (titleId_low == 0 && titleId_high == 0) { + if (titleId == 0) { CMPTLaunchMenu(dataBuffer, dataSize); } else { - CMPTLaunchTitle(dataBuffer, dataSize, titleId_low, titleId_high); + CMPTLaunchTitle(dataBuffer, dataSize, titleId); } free(dataBuffer); } void bootvWiiMenu() { - launchvWiiTitle(0, 0); + launchvWiiTitle(0); } void bootHomebrewChannel() { @@ -130,7 +127,7 @@ void bootHomebrewChannel() { if (fsaFd >= 0) { // mount the slccmpt if (IOSUHAX_FSA_Mount(fsaFd, "/dev/slccmpt01", "/vol/storage_slccmpt01", 2, nullptr, 0) >= 0) { - fileStat_s stat; + FSStat stat; // test if the OHBC or HBC is installed if (IOSUHAX_FSA_GetStat(fsaFd, "/vol/storage_slccmpt01/title/00010001/4f484243/content/00000000.app", &stat) >= 0) { @@ -157,5 +154,5 @@ void bootHomebrewChannel() { } DEBUG_FUNCTION_LINE("Launching vWii title %016llx", titleId); - launchvWiiTitle((uint32_t) (titleId >> 32), (uint32_t) (titleId & 0xffffffff)); + launchvWiiTitle(titleId); } diff --git a/source/QuickStartUtils.cpp b/source/QuickStartUtils.cpp index a8e2df0..1f35602 100644 --- a/source/QuickStartUtils.cpp +++ b/source/QuickStartUtils.cpp @@ -62,10 +62,6 @@ static void StartAppletAndExit() { _Exit(0); } -extern "C" int32_t SYSSwitchToBrowser(void *); -extern "C" int32_t SYSSwitchToEShop(void *); -extern "C" int32_t _SYSSwitchTo(uint32_t pfid); - void loadConsoleAccount(const char *data_uuid) { nn::act::Initialize(); for (int32_t i = 0; i < 13; i++) { @@ -162,7 +158,7 @@ bool getQuickBoot() { info.titleId == 0x000500301001820AL) { DEBUG_FUNCTION_LINE("Launching the Download Management"); loadConsoleAccount(data.uuid); - _SYSSwitchTo(12); + _SYSSwitchTo(SYSAPP_PFID_DOWNLOAD_MANAGEMENT); StartAppletAndExit(); @@ -173,7 +169,7 @@ bool getQuickBoot() { info.titleId == 0x000500301001620AL) { DEBUG_FUNCTION_LINE("Launching Miiverse"); loadConsoleAccount(data.uuid); - _SYSSwitchTo(9); + _SYSSwitchTo(SYSAPP_PFID_MIIVERSE); StartAppletAndExit(); @@ -184,7 +180,7 @@ bool getQuickBoot() { info.titleId == 0x000500301001520AL) { DEBUG_FUNCTION_LINE("Launching Friendlist"); loadConsoleAccount(data.uuid); - _SYSSwitchTo(11); + _SYSSwitchTo(SYSAPP_PFID_FRIENDLIST); StartAppletAndExit(); @@ -195,7 +191,7 @@ bool getQuickBoot() { info.titleId == 0x000500301001320AL) { DEBUG_FUNCTION_LINE("Launching TVii"); loadConsoleAccount(data.uuid); - _SYSSwitchTo(3); + _SYSSwitchTo(SYSAPP_PFID_TVII); StartAppletAndExit();