From df2a6f91788ab412b1df722baf220b315a8ea519 Mon Sep 17 00:00:00 2001 From: NotAndreh <39744335+NotAndreh@users.noreply.github.com> Date: Sun, 7 Sep 2025 13:31:11 +0200 Subject: [PATCH 1/2] Fix playtime tick not being always called --- dll/steam_client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/steam_client.cpp b/dll/steam_client.cpp index 6b28fa4a4..22c135f3b 100644 --- a/dll/steam_client.cpp +++ b/dll/steam_client.cpp @@ -33,13 +33,13 @@ void Steam_Client::background_thread_proc() network->Run(); // networking must run first since it receives messages used by each run_callback() run_every_runcb->run(); // call each run_callback() - if (settings_client->record_playtime) { - playtime_counter->tick(); // update playtime counter - } - // update the time counter to avoid overlap last_cb_run = (unsigned long long)std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); } + + if (settings_client->record_playtime) { + playtime_counter->tick(); // update playtime counter + } } Steam_Client::Steam_Client() From 014eda3d45e36e65e341594286a8c8d5da640d1e Mon Sep 17 00:00:00 2001 From: NotAndreh <39744335+NotAndreh@users.noreply.github.com> Date: Sun, 7 Sep 2025 16:08:30 +0200 Subject: [PATCH 2/2] Fix load function in playtime --- dll/playtime.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dll/playtime.cpp b/dll/playtime.cpp index fb5b105dc..679a33dbf 100644 --- a/dll/playtime.cpp +++ b/dll/playtime.cpp @@ -78,8 +78,7 @@ void PlaytimeCounter::load() playtime_seconds = 0; std::string data(32, '\0'); - if (local_storage->get_data("", playtime_filename, data.data(), static_cast(data.size()), 0) > 0 && - std::all_of(data.begin(), data.end(), ::isdigit)) { + if (local_storage->get_data("", playtime_filename, data.data(), static_cast(data.size()), 0) > 0) { try { playtime_seconds = std::stoull(data); } catch (...) {}