2023-09-03 02:01:32 -04:00
|
|
|
|
|
|
|
|
#include "LockedWrapper.h"
|
2023-09-04 03:27:31 -04:00
|
|
|
#include "DebugPrint.h"
|
2023-09-03 02:01:32 -04:00
|
|
|
|
|
|
|
|
void FLockedWrapper::InitWrapper() {
|
|
|
|
|
if (Lockable.Wrapper.play_initialize != nullptr) {
|
|
|
|
|
// Already initialized.
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
void* DLL = FPlatformProcess::GetDllHandle(TEXT("c:\\Luprex\\build\\visual\\luprexlib.dll"));
|
|
|
|
|
if (DLL != nullptr) {
|
|
|
|
|
using InitFn = void (*)(EngineWrapper*);
|
|
|
|
|
InitFn init = (InitFn)FPlatformProcess::GetDllExport(DLL, TEXT("init_engine_wrapper"));
|
|
|
|
|
if (init != nullptr) {
|
|
|
|
|
init(&Lockable.Wrapper);
|
2023-09-04 03:21:23 -04:00
|
|
|
Lockable.Wrapper.hook_dprint(DebugPrint::DPrint);
|
2023-09-03 02:01:32 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|