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 (...) {} 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()