diff --git a/overlay_experimental/overlay/steam_overlay.h b/overlay_experimental/overlay/steam_overlay.h index 97aa3696..0dfdc8da 100644 --- a/overlay_experimental/overlay/steam_overlay.h +++ b/overlay_experimental/overlay/steam_overlay.h @@ -96,6 +96,8 @@ class Steam_Overlay // friend id, show client window (to chat and accept invite maybe) std::map friends; + // avoids spam loading on failure + std::atomic load_achievements_trials = 3; bool setup_overlay_called; bool is_ready; bool show_overlay; diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index df84cdc4..8c5b08b8 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -458,6 +458,7 @@ void Steam_Overlay::AddMessageNotification(std::string const& message) PRINT_DEBUG("No more free id to create a notification window\n"); } +// show a notification when the user unlocks an achievement void Steam_Overlay::AddAchievementNotification(nlohmann::json const& ach) { std::lock_guard lock(notifications_mutex); @@ -1113,7 +1114,7 @@ void Steam_Overlay::OverlayProc() } } - if (show_achievements && achievements.size()) { + if (show_achievements && achievements.size()) { // display achievements list when the button "show achievements" is pressed ImGui::SetNextWindowSizeConstraints(ImVec2(ImGui::GetFontSize() * 32, ImGui::GetFontSize() * 32), ImVec2(8192, 8192)); bool show = show_achievements; if (ImGui::Begin(translationAchievementWindow[current_language], &show)) { @@ -1314,7 +1315,8 @@ void Steam_Overlay::Callback(Common_Message *msg) void Steam_Overlay::RunCallbacks() { - if (!achievements.size()) { + if (!achievements.size() && load_achievements_trials > 0) { + --load_achievements_trials; Steam_User_Stats* steamUserStats = get_steam_client()->steam_user_stats; uint32 achievements_num = steamUserStats->GetNumAchievements(); if (achievements_num) { diff --git a/post_build/README.release.md b/post_build/README.release.md index 94e96a0d..b23cca8e 100644 --- a/post_build/README.release.md +++ b/post_build/README.release.md @@ -438,9 +438,11 @@ Check the exaxmple files in the `steam_settings` folder ## Auto accept game/lobby invites: When the overlay is enabled and working, you can bypass it and auto-accept invites (lobby or game) from a list of Steam IDs (SteamID64 format). -The configuration file `auto_accept_invite.txt` allows you to do that, add each SteamID64 on a separate line. - -Also you can auto-accept invites from anyone by leaving the file empty. +The configuration file `auto_accept_invite.txt` allows you to do that, it works like this: +* Adding an empty file: will accept invites from anyone (same behavior as if the overlay was disabled) +* Adding a file with some friends IDs (each on a separate line): + * If the friend ID is found in this file, the invitation will be accepted automatically + * If the friend ID is not found, you'll get the regular overlay invitation Check the exaxmple file in the `steam_settings` folder