mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2025-07-18 17:37:53 +08:00
clean up code
This commit is contained in:
@ -9,7 +9,7 @@ namespace GamePH {
|
||||
GetModuleFileNameA(GetModuleHandleA(nullptr), exePath, sizeof(exePath));
|
||||
|
||||
DWORD dummy{};
|
||||
DWORD size = GetFileVersionInfoSizeA(exePath, &dummy);
|
||||
const DWORD size = GetFileVersionInfoSizeA(exePath, &dummy);
|
||||
if (!size)
|
||||
return 0;
|
||||
|
||||
@ -19,9 +19,7 @@ namespace GamePH {
|
||||
|
||||
VS_FIXEDFILEINFO* fileInfo = nullptr;
|
||||
UINT fileInfoSize = 0;
|
||||
if (!VerQueryValueA(data.data(), "\\", reinterpret_cast<void**>(&fileInfo), &fileInfoSize))
|
||||
return 0;
|
||||
if (fileInfo == nullptr)
|
||||
if (!VerQueryValueA(data.data(), "\\", reinterpret_cast<LPVOID*>(&fileInfo), &fileInfoSize) || !fileInfo)
|
||||
return 0;
|
||||
|
||||
const DWORD major = HIWORD(fileInfo->dwFileVersionMS);
|
||||
|
@ -43,7 +43,9 @@ namespace GamePH {
|
||||
|
||||
LifeSetHealthHook.pOriginal(pLifeHealth, health);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region IsNotOutOfBounds
|
||||
static bool detourIsNotOutOfBounds(LPVOID pInstance, DWORD64 a2);
|
||||
static Utils::Hook::MHook<LPVOID, bool(*)(LPVOID, DWORD64)> IsNotOutOfBoundsHook{ "IsNotOutOfBounds", &Offsets::Get_IsNotOutOfBounds, &detourIsNotOutOfBounds };
|
||||
|
||||
|
Reference in New Issue
Block a user