This commit is contained in:
HolographicHat
2024-08-05 18:11:51 +08:00
parent 0348cfa365
commit 8e0fd2d27c

View File

@@ -18,7 +18,8 @@ using std::string;
void InitIL2CPP() {
TCHAR szFileName[MAX_PATH];
GetModuleFileName(nullptr, szFileName, MAX_PATH);
const auto isCN = strstr(szFileName, "YuanShen.exe");
_strupr_s(szFileName);
const auto isCN = strstr(szFileName, "YUANSHEN.EXE");
const auto uBase = reinterpret_cast<uint64_t>(GetModuleHandle(isCN ? "YuanShen.exe" : "GenshinImpact.exe"));
#define DO_APP_FUNC(ca, oa, r, n, p) n = (r (*) p)(uBase + (isCN ? ca : oa))
#include "il2cpp-functions.h"