Devolution supports STUBHAXX returnTo loading. Use it.

This commit is contained in:
xperia64 2022-06-30 02:48:42 -04:00
parent 8e22fbe8e5
commit 7b53332c36

View File

@ -55,6 +55,7 @@
#include "FileOperations/fileops.h" #include "FileOperations/fileops.h"
#include "prompts/ProgressWindow.h" #include "prompts/ProgressWindow.h"
#include "neek.hpp" #include "neek.hpp"
#include "lstub.h"
/* GCC 11 false positives */ /* GCC 11 false positives */
#if __GNUC__ > 10 #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 devoDButtonsChoice = game_cfg->DEVODButtons == INHERIT ? Settings.DEVODButtons : game_cfg->DEVODButtons;
u8 devoCropOverscanChoice = game_cfg->DEVOCropOverscan == INHERIT ? Settings.DEVOCropOverscan : game_cfg->DEVOCropOverscan; u8 devoCropOverscanChoice = game_cfg->DEVOCropOverscan == INHERIT ? Settings.DEVOCropOverscan : game_cfg->DEVOCropOverscan;
u8 devoDiscDelayChoice = game_cfg->DEVODiscDelay == INHERIT ? Settings.DEVODiscDelay : game_cfg->DEVODiscDelay; 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) 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("DEVO: Memory Card: %s\n\n", DEVO_memCard);
gprintf("%.72s", (const char*)loader_bin + 4); gprintf("%.72s", (const char*)loader_bin + 4);
if (returnToChoice)
{
loadStub();
Set_Stub(returnToChoice);
}
u32 cpu_isr; u32 cpu_isr;
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0); SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
_CPU_ISR_Disable( cpu_isr ); _CPU_ISR_Disable( cpu_isr );