mirror of
https://github.com/wiiu-env/WUMSLoader.git
synced 2024-12-25 23:51:50 +01:00
Only execute the WUMSLoader for the Game and Menu process
This commit is contained in:
parent
d7a4c8abda
commit
e5ac7dc723
@ -20,6 +20,7 @@ std::vector<std::shared_ptr<ModuleData>> OrderModulesByDependencies(const std::v
|
||||
// The compiler tries to optimize this otherwise and calling the main function earlier
|
||||
extern "C" int _start(int argc, char **argv) {
|
||||
InitFunctionPointers();
|
||||
|
||||
static uint8_t ucSetupRequired = 1;
|
||||
if (ucSetupRequired) {
|
||||
gHeapHandle = MEMCreateExpHeapEx((void *) (MEMORY_REGION_USABLE_HEAP_START), MEMORY_REGION_USABLE_HEAP_END - MEMORY_REGION_USABLE_HEAP_START, 1);
|
||||
@ -31,7 +32,10 @@ extern "C" int _start(int argc, char **argv) {
|
||||
ucSetupRequired = 0;
|
||||
}
|
||||
|
||||
doStart(argc, argv);
|
||||
uint32_t upid = OSGetUPID();
|
||||
if (upid == 2 || upid == 15) {
|
||||
doStart(argc, argv);
|
||||
}
|
||||
|
||||
return ((int (*)(int, char **))(*(unsigned int *) 0x1005E040))(argc, argv);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ IMPORT(MEMFreeToExpHeap);
|
||||
IMPORT(MEMAllocFromExpHeapEx);
|
||||
IMPORT(MEMGetAllocatableSizeForExpHeapEx);
|
||||
IMPORT(MEMCreateExpHeapEx);
|
||||
IMPORT(OSGetUPID);
|
||||
IMPORT(OSUninterruptibleSpinLock_Acquire);
|
||||
IMPORT(OSUninterruptibleSpinLock_Release);
|
||||
IMPORT(OSReport);
|
||||
|
Loading…
Reference in New Issue
Block a user