2021-12-25 22:36:38 +01:00
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "launcher/IApplication.h"
|
|
|
|
#include "ebisusdk/EbisuSDK.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2022-01-17 03:41:27 +01:00
|
|
|
// Purpose:
|
2021-12-25 22:36:38 +01:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
void* HIApplication_Main(void* a1, void* a2)
|
|
|
|
{
|
|
|
|
HEbisuSDK_Init();
|
|
|
|
return IAppSystem_Main(a1, a2);
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2022-01-17 03:41:27 +01:00
|
|
|
// Purpose:
|
2021-12-25 22:36:38 +01:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
bool HIApplication_Create(void* a1)
|
|
|
|
{
|
2021-12-30 17:20:41 +01:00
|
|
|
#ifdef DEDICATED
|
|
|
|
// TODO: Don't hardcode!
|
2022-01-17 03:41:27 +01:00
|
|
|
// Also add cross-season support?
|
2021-12-30 17:20:41 +01:00
|
|
|
* (uintptr_t*)0x162C61208 = 0x1; // g_bDedicated
|
|
|
|
#endif // DEDICATED
|
2021-12-25 22:36:38 +01:00
|
|
|
return IAppSystem_Create(a1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void IApplication_Attach()
|
|
|
|
{
|
|
|
|
DetourAttach((LPVOID*)&IAppSystem_Main, &HIApplication_Main);
|
|
|
|
DetourAttach((LPVOID*)&IAppSystem_Create, &HIApplication_Create);
|
|
|
|
}
|
|
|
|
|
|
|
|
void IApplication_Detach()
|
|
|
|
{
|
|
|
|
DetourDetach((LPVOID*)&IAppSystem_Main, &HIApplication_Main);
|
|
|
|
DetourDetach((LPVOID*)&IAppSystem_Create, &HIApplication_Create);
|
|
|
|
}
|