2016-10-29 02:56:40 +01:00
|
|
|
#include <coreinit/dynload.h>
|
|
|
|
#include <coreinit/debug.h>
|
|
|
|
|
2016-11-22 22:48:44 +01:00
|
|
|
#define IMPORT(name) void* addr_##name
|
|
|
|
#define IMPORT_BEGIN(lib)
|
2016-11-23 00:06:35 +01:00
|
|
|
#define IMPORT_END(lib)
|
2016-11-22 22:48:44 +01:00
|
|
|
#include "imports.h"
|
2016-10-29 02:56:40 +01:00
|
|
|
|
2016-11-22 22:48:44 +01:00
|
|
|
#undef IMPORT
|
|
|
|
#undef IMPORT_BEGIN
|
|
|
|
#undef IMPORT_END
|
2016-11-02 22:06:15 +01:00
|
|
|
|
2016-11-22 22:48:44 +01:00
|
|
|
#define IMPORT(name) do{if(OSDynLoad_FindExport(handle, 0, #name, &addr_##name) < 0)OSFatal("Function " # name " is NULL");} while(0)
|
|
|
|
#define IMPORT_BEGIN(lib) OSDynLoad_Acquire(#lib ".rpl", &handle)
|
2016-11-23 00:06:35 +01:00
|
|
|
//#define IMPORT_END(lib) OSDynLoad_Release(handle)
|
|
|
|
#define IMPORT_END(lib)
|
2016-10-29 02:56:40 +01:00
|
|
|
|
|
|
|
void InitFunctionPointers(void)
|
|
|
|
{
|
|
|
|
OSDynLoadModule handle;
|
|
|
|
addr_OSDynLoad_Acquire = *(void**)0x00801500;
|
|
|
|
addr_OSDynLoad_FindExport = *(void**)0x00801504;
|
|
|
|
|
2016-11-22 22:48:44 +01:00
|
|
|
#include "imports.h"
|
2016-10-29 02:56:40 +01:00
|
|
|
|
|
|
|
}
|