Skip to content

Commit

Permalink
Fix for 1.06
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegmd committed Dec 23, 2020
1 parent 4e7746c commit ef638e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void Image::Initialize()
{
static uint8_t s_Guid104[] = { 0x2B, 0x4E, 0x65, 0x3D, 0xD4, 0x68, 0xC7, 0x42, 0xBF, 0xC9, 0x58, 0xDC, 0x38, 0xD4, 0x2A, 0x36 };
static uint8_t s_Guid105[] = { 0x93, 0x5B, 0x36, 0x35, 0xDF, 0xA8, 0xE7, 0x41, 0x91, 0x8A, 0x64, 0x64, 0xF7, 0xA4, 0xF0, 0x8E };
static uint8_t s_Guid106[] = { 0x67, 0xFB, 0x96, 0x6B, 0xAA, 0x3D, 0x57, 0x4E, 0x93, 0x8F, 0x1C, 0xC5, 0x85, 0xc6, 0xF5, 0x29 };

auto* pImage = GetModuleHandleA(nullptr);
IMAGE_NT_HEADERS* pHeader = ImageNtHeader(pImage);
Expand Down Expand Up @@ -49,6 +50,13 @@ void Image::Initialize()
version = MakeVersion(1, 4);
else if (memcmp(&pdb_info->Guid, s_Guid105, 16) == 0)
version = MakeVersion(1, 5);
else if (memcmp(&pdb_info->Guid, s_Guid106, 16) == 0)
version = MakeVersion(1, 6);
else
{
for (auto c : pdb_info->Guid)
spdlog::info("{:X}", (uint32_t)c);
}
}
}
}
5 changes: 3 additions & 2 deletions src/overlay/Overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ void Overlay::DrawImgui(IDXGISwapChain3* apSwapChain)

ImGui::Begin("Cyber Engine Tweaks");

if (Options::Get().GameImage.version == Image::MakeVersion(1, 4) ||
Options::Get().GameImage.version == Image::MakeVersion(1, 5))
auto [major, minor] = Options::Get().GameImage.GetVersion();

if (major == 1 && (minor >= 4 && minor <= 6))
{
ImGui::Checkbox("Clear Input", &m_inputClear);
ImGui::SameLine();
Expand Down

0 comments on commit ef638e6

Please sign in to comment.