Fix exiting from the dumper

This commit is contained in:
GaryOderNichts 2021-12-30 20:14:25 +01:00
parent 6122f9e997
commit 5c5ec09780
5 changed files with 24 additions and 11 deletions

View File

@ -37,6 +37,7 @@ EXPORT_DECL(int, OSDynLoad_FindExport, u32 handle, int isdata, const char *symbo
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EXPORT_DECL(int, OSGetSecurityLevel, void);
EXPORT_DECL(int, OSForceFullRelaunch, void);
EXPORT_DECL(void, OSShutdown, void);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Thread functions
@ -139,6 +140,7 @@ void InitOSFunctionPointers(void)
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OS_FIND_EXPORT(coreinit_handle, OSGetSecurityLevel);
OS_FIND_EXPORT(coreinit_handle, OSForceFullRelaunch);
OS_FIND_EXPORT(coreinit_handle, OSShutdown);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! System functions
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -85,6 +85,7 @@ extern int (* OSDynLoad_FindExport)(u32 handle, int isdata, const char *symbol,
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
extern int (* OSGetSecurityLevel)(void);
extern int (* OSForceFullRelaunch)(void);
extern void (* OSShutdown)(void);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Thread functions

View File

@ -7,6 +7,8 @@ extern "C" {
#include <gctypes.h>
typedef u32 BOOL;
typedef struct _OSCalendarTime {
int sec;
int min;

View File

@ -55,10 +55,10 @@ int Menu_Main(int argc, char ** argv){
cfw_config_t config;
default_config(&config);
//int launch = 1;
ShowMenu(&config);
int launch = ShowMenu(&config);
if (launch) {
ExecuteIOSExploit(&config);
}
if (
OSGetTitleID() == 0x000500101004A200L || // mii maker eur
@ -66,15 +66,23 @@ int Menu_Main(int argc, char ** argv){
OSGetTitleID() == 0x000500101004A000L) { // mii maker jpn
// restart mii maker.
if (launch) {
OSForceFullRelaunch();
SYSLaunchMenu();
} else {
OSShutdown();
}
return ( (int (*)(int, char **))(*(unsigned int*)0x1005E040) )(argc, argv);
}
ProcUIInit(OSSavesDone_ReadyToRelease);
if (launch) {
OSForceFullRelaunch();
SYSLaunchMenu();
} else {
OSShutdown();
}
while (CheckRunning()) {
log_printf_("check");

View File

@ -239,7 +239,7 @@ int ShowMenu(cfw_config_t * currentConfig)
console_print_pos(x_offset, 1, " -- NAND Dumper --");
console_print_pos(x_offset, 3, "Select your options and press A to launch.");
console_print_pos(x_offset, 4, "Press HOME to exit back to HBL.");
console_print_pos(x_offset, 4, "Press HOME to shutdown the console.");
//console_print_pos(x_offset, 5, "Hold B on start to force enter this menu");
int y_offset = 6;
@ -254,7 +254,7 @@ int ShowMenu(cfw_config_t * currentConfig)
TEXT_SEL(configPtr[idx], " ", "<"), selection_options[idx].disabled, TEXT_SEL(configPtr[idx], " ", ">"));
}
console_print_pos(x_offset, 15, "Based on mocha CFW by Dimok.");
console_print_pos(x_offset, 15, "Original NAND Dumper by koolkdev. Based on mocha CFW by Dimok.");
console_print_pos(x_offset, 16, "Credits go to everyone who contributed to Wii U scene publicly.");
console_print_pos(x_offset, 17, "Special thanks to smealum, plutoo, yellows8, naehrwert and derrek.");