mirror of
https://github.com/wiiu-env/WUMSLoader.git
synced 2024-11-27 10:04:16 +01:00
Use OSDynLoad_IsModuleLoaded instead of OSDynLoad_Acquire and add missing call
This commit is contained in:
parent
49ca0b803f
commit
241b5ba661
@ -33,7 +33,7 @@ void InitFunctionPointers(void) {
|
|||||||
addr_OSDynLoad_FindExport = (void *) 0x0102B828; // 0200f428 - 0xFE3C00
|
addr_OSDynLoad_FindExport = (void *) 0x0102B828; // 0200f428 - 0xFE3C00
|
||||||
addr_OSDynLoad_IsModuleLoaded = (void *) 0x0102A59C; // 0200e19c - 0xFE3C00
|
addr_OSDynLoad_IsModuleLoaded = (void *) 0x0102A59C; // 0200e19c - 0xFE3C00
|
||||||
|
|
||||||
OSDynLoad_Acquire("coreinit.rpl", &handle);
|
OSDynLoad_IsModuleLoaded("coreinit.rpl", &handle);
|
||||||
|
|
||||||
uint32_t **value = 0;
|
uint32_t **value = 0;
|
||||||
OSDynLoad_FindExport(handle, 1, "MEMAllocFromDefaultHeap", (void **) &value);
|
OSDynLoad_FindExport(handle, 1, "MEMAllocFromDefaultHeap", (void **) &value);
|
||||||
@ -43,6 +43,9 @@ void InitFunctionPointers(void) {
|
|||||||
OSDynLoad_FindExport(handle, 1, "MEMFreeToDefaultHeap", (void **) &value);
|
OSDynLoad_FindExport(handle, 1, "MEMFreeToDefaultHeap", (void **) &value);
|
||||||
MEMFreeToDefaultHeap = *value;
|
MEMFreeToDefaultHeap = *value;
|
||||||
#include "imports.h"
|
#include "imports.h"
|
||||||
|
|
||||||
|
OSDynLoad_IsModuleLoaded("coreinit.rpl", &handle);
|
||||||
|
|
||||||
// override failed __rplwrap_exit find export
|
// override failed __rplwrap_exit find export
|
||||||
OSDynLoad_FindExport(handle, 0, "exit", (void **) &addr___rplwrap_exit);
|
OSDynLoad_FindExport(handle, 0, "exit", (void **) &addr___rplwrap_exit);
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,6 @@ IMPORT(OSSetThreadSpecific);
|
|||||||
IMPORT(OSInitCond);
|
IMPORT(OSInitCond);
|
||||||
IMPORT(OSWaitCond);
|
IMPORT(OSWaitCond);
|
||||||
IMPORT(OSSignalCond);
|
IMPORT(OSSignalCond);
|
||||||
IMPORT(MEMAllocFromDefaultHeapEx);
|
|
||||||
IMPORT(MEMFreeToDefaultHeap);
|
|
||||||
IMPORT(OSSwapAtomic);
|
IMPORT(OSSwapAtomic);
|
||||||
IMPORT(OSDynLoad_GetAllocator);
|
IMPORT(OSDynLoad_GetAllocator);
|
||||||
IMPORT(OSDynLoad_SetAllocator);
|
IMPORT(OSDynLoad_SetAllocator);
|
||||||
|
Loading…
Reference in New Issue
Block a user