mirror of
https://github.com/wiiu-env/CustomRPXLoader.git
synced 2024-11-13 22:15:06 +01:00
Save the current titleId when executing the payload.elf
This commit is contained in:
parent
8498757a87
commit
4f208ba8a6
@ -18,6 +18,7 @@
|
||||
#include <stdint.h>
|
||||
#include <coreinit/cache.h>
|
||||
#include <coreinit/dynload.h>
|
||||
#include <coreinit/title.h>
|
||||
#include <sysapp/launch.h>
|
||||
#include <nsysnet/socket.h>
|
||||
#include <proc_ui/procui.h>
|
||||
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user