Skip to content

Commit

Permalink
Add version check to ensure the mod is loaded on patch 2.12 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
wopss committed Mar 1, 2024
1 parent 4b98940 commit 400f7db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dll/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@ App::App()

const auto& productVer = image->GetProductVersion();
spdlog::info("Product version: {}.{}{}", productVer.major, productVer.minor, productVer.patch);

spdlog::info("File version: {}.{}.{}.{}", fileVer.major, fileVer.minor, fileVer.build, fileVer.revision);

if (fileVer < RED4EXT_RUNTIME_2_12)
{
spdlog::error(L"To use this version of RED4ext, ensure your game is updated to patch 2.12 or newer");
return;
}

Addresses::Construct(m_paths);

if (AttachHooks())
Expand Down

0 comments on commit 400f7db

Please sign in to comment.