From 7b53332c36d5b0f746a1e5f715aa904f67e87272 Mon Sep 17 00:00:00 2001 From: xperia64 Date: Thu, 30 Jun 2022 02:48:42 -0400 Subject: [PATCH] Devolution supports STUBHAXX returnTo loading. Use it. --- source/usbloader/GameBooter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/usbloader/GameBooter.cpp b/source/usbloader/GameBooter.cpp index 92e97665..1a66f769 100644 --- a/source/usbloader/GameBooter.cpp +++ b/source/usbloader/GameBooter.cpp @@ -55,6 +55,7 @@ #include "FileOperations/fileops.h" #include "prompts/ProgressWindow.h" #include "neek.hpp" +#include "lstub.h" /* GCC 11 false positives */ #if __GNUC__ > 10 @@ -818,6 +819,7 @@ int GameBooter::BootDevolution(struct discHdr *gameHdr) u8 devoDButtonsChoice = game_cfg->DEVODButtons == INHERIT ? Settings.DEVODButtons : game_cfg->DEVODButtons; u8 devoCropOverscanChoice = game_cfg->DEVOCropOverscan == INHERIT ? Settings.DEVOCropOverscan : game_cfg->DEVOCropOverscan; u8 devoDiscDelayChoice = game_cfg->DEVODiscDelay == INHERIT ? Settings.DEVODiscDelay : game_cfg->DEVODiscDelay; + u64 returnToChoice = strlen(Settings.returnTo) > 0 ? NandTitles.FindU32(Settings.returnTo) : 0; if(gameHdr->type == TYPE_GAME_GC_DISC) { @@ -1021,6 +1023,12 @@ int GameBooter::BootDevolution(struct discHdr *gameHdr) gprintf("DEVO: Memory Card: %s\n\n", DEVO_memCard); gprintf("%.72s", (const char*)loader_bin + 4); + if (returnToChoice) + { + loadStub(); + Set_Stub(returnToChoice); + } + u32 cpu_isr; SYS_ResetSystem(SYS_SHUTDOWN, 0, 0); _CPU_ISR_Disable( cpu_isr );