Update steam_user_stats.cpp

merge-requests/28/head
Nemirtingas 2019-12-09 06:35:33 +00:00
parent d75b1850e4
commit c8028d6a98
1 changed files with 2 additions and 0 deletions

View File

@ -208,7 +208,9 @@ bool Steam_User_Stats::SetAchievement(const char* pchName)
if (user_achievements.find(pchName) == user_achievements.end() || user_achievements[pchName].value("earned", false) == false) { if (user_achievements.find(pchName) == user_achievements.end() || user_achievements[pchName].value("earned", false) == false) {
user_achievements[pchName]["earned"] = true; user_achievements[pchName]["earned"] = true;
user_achievements[pchName]["earned_time"] = std::chrono::duration_cast<std::chrono::duration<uint32>>(std::chrono::system_clock::now().time_since_epoch()).count(); user_achievements[pchName]["earned_time"] = std::chrono::duration_cast<std::chrono::duration<uint32>>(std::chrono::system_clock::now().time_since_epoch()).count();
#ifndef NO_OVERLAY
get_steam_client()->steam_overlay->AddAchievementNotification(it.value()); get_steam_client()->steam_overlay->AddAchievementNotification(it.value());
#endif
} }
return true; return true;
} }