RetroArch/wiiu/system/dynamic.c

26 lines
673 B
C
Raw Normal View History

#include <coreinit/dynload.h>
#include <coreinit/debug.h>
#define EXPORT(name) void* addr_##name
2016-11-02 22:06:15 +01:00
#define EXPORT_BEGIN(lib)
#define EXPORT_END()
#include "exports/all.h"
#undef EXPORT
2016-11-02 22:06:15 +01:00
#undef EXPORT_BEGIN
2016-11-06 18:59:39 +01:00
//#undef EXPORT_END
2016-11-02 22:06:15 +01:00
#define EXPORT(name) do{if(OSDynLoad_FindExport(handle, 0, #name, &addr_##name) < 0)OSFatal("Function " # name " is NULL");} while(0)
#define EXPORT_BEGIN(lib) OSDynLoad_Acquire(#lib, &handle)
2016-11-06 18:59:39 +01:00
//#define EXPORT_END() OSDynLoad_Release(handle)
void InitFunctionPointers(void)
{
OSDynLoadModule handle;
addr_OSDynLoad_Acquire = *(void**)0x00801500;
addr_OSDynLoad_FindExport = *(void**)0x00801504;
2016-11-02 22:06:15 +01:00
#include "exports/all.h"
}