diff --git a/src/client/component/arxan.cpp b/src/client/component/arxan.cpp index 21178d29..04125e2a 100644 --- a/src/client/component/arxan.cpp +++ b/src/client/component/arxan.cpp @@ -426,7 +426,6 @@ namespace arxan uint32_t adjust_integrity_checksum(const uint64_t return_address, uint8_t* stack_frame, const uint32_t current_checksum) { - //const auto handler_address = return_address - 5; const auto* context = search_handler_context(stack_frame, current_checksum); if (!context) @@ -438,11 +437,14 @@ namespace arxan const auto correct_checksum = *context->original_checksum; *context->computed_checksum = correct_checksum; - /*if (current_checksum != correct_checksum) + if (current_checksum != correct_checksum) { - OutputDebugStringA(utils::string::va("Adjusting checksum (%llX): %X -> %X", handler_address, - current_checksum, correct_checksum)); - }*/ +#ifndef NDEBUG + const auto handler_address = return_address - 5; + printf("Adjusting checksum (%llX): %X -> %X\n", handler_address, + current_checksum, correct_checksum); +#endif + } return correct_checksum; } diff --git a/src/client/component/branding.cpp b/src/client/component/branding.cpp index 6dfe19a1..a964405d 100644 --- a/src/client/component/branding.cpp +++ b/src/client/component/branding.cpp @@ -13,7 +13,7 @@ namespace branding void draw_branding() { constexpr auto x = 4; - constexpr auto y = -6; + constexpr auto y = -5; constexpr auto scale = 1.0f; //float color[4] = {0.666f, 0.666f, 0.666f, 0.666f}; float color[4] = {236 / 255.0f, 113 / 255.0f, 10 / 255.0f, 1.0f}; diff --git a/src/client/component/console.cpp b/src/client/component/console.cpp index 1520ad4e..3f1c6dc6 100644 --- a/src/client/component/console.cpp +++ b/src/client/component/console.cpp @@ -14,12 +14,13 @@ namespace console { namespace { - volatile bool g_started = false; HANDLE logo; + std::atomic_bool started{false}; + std::atomic_bool terminate_runner{false}; void print_message(const char* message) { - if (g_started) + if (started && !terminate_runner) { game::Com_Printf(0, 0, "%s", message); } @@ -159,7 +160,7 @@ namespace console utils::hook::jump(printf, print_stub); - this->terminate_runner_ = false; + terminate_runner = false; this->console_runner_ = utils::thread::create_named_thread("Console IO", [this] { @@ -168,11 +169,11 @@ namespace console sys_create_console_hook.create(0x1423339C0_g, sys_create_console_stub); game::Sys_ShowConsole(); - g_started = true; + started = true; } MSG msg{}; - while (!this->terminate_runner_) + while (!terminate_runner) { if (PeekMessageW(&msg, nullptr, NULL, NULL, PM_REMOVE)) { @@ -189,7 +190,7 @@ namespace console void pre_destroy() override { - this->terminate_runner_ = true; + terminate_runner = true; if (this->console_runner_.joinable()) { @@ -198,7 +199,6 @@ namespace console } private: - std::atomic_bool terminate_runner_{false}; std::thread console_runner_; }; }