mirror of
https://github.com/wiiu-env/CustomRPXLoader.git
synced 2024-11-13 22:15:06 +01:00
Don't run the ProcUI setup if payload.rpx failes and the payload.elf was loaded via H&S
This commit is contained in:
parent
84e3764447
commit
8b01f5ca75
21
src/main.cpp
21
src/main.cpp
@ -69,6 +69,9 @@ extern "C" int _start(int argc, char **argv) {
|
||||
WHBLogUdpInit();
|
||||
|
||||
int res = 0;
|
||||
// If we load from our CustomRPXLoader the argv is set with "safe.rpx"
|
||||
// in this case we don't want to do any ProcUi stuff on error, only on success
|
||||
bool doProcUI = (argc != 1 || std::string(argv[0]) != "safe.rpx");
|
||||
|
||||
uint32_t ApplicationMemoryEnd;
|
||||
|
||||
@ -100,19 +103,21 @@ extern "C" int _start(int argc, char **argv) {
|
||||
ICInvalidateRange((void *) 0x00800000, 0x00800000);
|
||||
DEBUG_FUNCTION_LINE("New entrypoint: %08X", moduleData->getEntrypoint());
|
||||
((int (*)(int, char **)) moduleData->getEntrypoint())(argc, argv);
|
||||
doProcUI = true;
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE("Failed to load module");
|
||||
}
|
||||
|
||||
SYSLaunchMenu();
|
||||
|
||||
ProcUIInit(OSSavesDone_ReadyToRelease);
|
||||
DEBUG_FUNCTION_LINE("In ProcUI loop");
|
||||
while (CheckRunning()) {
|
||||
// wait.
|
||||
OSSleepTicks(OSMillisecondsToTicks(100));
|
||||
if (doProcUI) {
|
||||
SYSLaunchMenu();
|
||||
ProcUIInit(OSSavesDone_ReadyToRelease);
|
||||
DEBUG_FUNCTION_LINE("In ProcUI loop");
|
||||
while (CheckRunning()) {
|
||||
// wait.
|
||||
OSSleepTicks(OSMillisecondsToTicks(100));
|
||||
}
|
||||
ProcUIShutdown();
|
||||
}
|
||||
ProcUIShutdown();
|
||||
|
||||
__fini_wut();
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user