mirror of
https://github.com/wiiu-env/CustomRPXLoader.git
synced 2024-11-25 11:16:55 +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();
|
WHBLogUdpInit();
|
||||||
|
|
||||||
int res = 0;
|
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;
|
uint32_t ApplicationMemoryEnd;
|
||||||
|
|
||||||
@ -100,19 +103,21 @@ extern "C" int _start(int argc, char **argv) {
|
|||||||
ICInvalidateRange((void *) 0x00800000, 0x00800000);
|
ICInvalidateRange((void *) 0x00800000, 0x00800000);
|
||||||
DEBUG_FUNCTION_LINE("New entrypoint: %08X", moduleData->getEntrypoint());
|
DEBUG_FUNCTION_LINE("New entrypoint: %08X", moduleData->getEntrypoint());
|
||||||
((int (*)(int, char **)) moduleData->getEntrypoint())(argc, argv);
|
((int (*)(int, char **)) moduleData->getEntrypoint())(argc, argv);
|
||||||
|
doProcUI = true;
|
||||||
} else {
|
} else {
|
||||||
DEBUG_FUNCTION_LINE("Failed to load module");
|
DEBUG_FUNCTION_LINE("Failed to load module");
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSLaunchMenu();
|
if (doProcUI) {
|
||||||
|
SYSLaunchMenu();
|
||||||
ProcUIInit(OSSavesDone_ReadyToRelease);
|
ProcUIInit(OSSavesDone_ReadyToRelease);
|
||||||
DEBUG_FUNCTION_LINE("In ProcUI loop");
|
DEBUG_FUNCTION_LINE("In ProcUI loop");
|
||||||
while (CheckRunning()) {
|
while (CheckRunning()) {
|
||||||
// wait.
|
// wait.
|
||||||
OSSleepTicks(OSMillisecondsToTicks(100));
|
OSSleepTicks(OSMillisecondsToTicks(100));
|
||||||
|
}
|
||||||
|
ProcUIShutdown();
|
||||||
}
|
}
|
||||||
ProcUIShutdown();
|
|
||||||
|
|
||||||
__fini_wut();
|
__fini_wut();
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user