diff --git a/src/main.cpp b/src/main.cpp index 909bd2d..ab4ee17 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -72,11 +73,13 @@ 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"); + uint64_t *cfwLaunchedWithPtr = (uint64_t *) 0x00FFFFF8; + *cfwLaunchedWithPtr = OSGetTitleID(); + uint32_t ApplicationMemoryEnd; asm volatile("lis %0, __CODE_END@h; ori %0, %0, __CODE_END@l" : "=r" (ApplicationMemoryEnd));