Skip to content

Commit

Permalink
Abort once per new patch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
moonshadow565 committed Apr 7, 2023
1 parent 4dfcd85 commit 7ef20b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cslol-tools/lib/lol/patcher/patcher_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ static bool skinhack_detected() {
return fs::exists("C:/Fraps/LOLPRO.exe", ec);
}

[[noreturn]] static void newpatch_detected() {
lol_trace_func("Skipping first game on a new patch for config...");
lol_trace_func("Patching should work normally next game!");
lol_throw_msg("NEW PATCH DETECTED, THIS IS NOT AN ERROR!\n");
}

auto patcher::run(std::function<bool(Message, char const*)> update,
fs::path const& profile_path,
fs::path const& config_path,
Expand Down Expand Up @@ -293,6 +299,8 @@ auto patcher::run(std::function<bool(Message, char const*)> update,

if (!update(M_NEED_SAVE, "")) return;
ctx.save_config(config_path);

newpatch_detected();
} else {
for (std::uint32_t timeout = 3 * 60 * 1000; timeout; timeout -= 1) {
if (!update(M_WAIT_PATCHABLE, "")) return;
Expand Down

0 comments on commit 7ef20b9

Please sign in to comment.