From 6b721266ea1c76aed944ab1868974a4ce8505334 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:21:11 +0200 Subject: [PATCH] allow players connections even when the overlay isn't ready workaround #107 --- overlay_experimental/steam_overlay.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index 2dda6eef..06aec006 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -1837,7 +1837,9 @@ void Steam_Overlay::FriendConnect(Friend _friend) { PRINT_DEBUG("Steam_Overlay::FriendConnect " "%" PRIu64 "\n", _friend.id()); std::lock_guard lock(overlay_mutex); - if (!Ready()) return; + // players connections might happen earlier before the overlay is ready + // we don't want to miss them + //if (!Ready()) return; int id = find_free_friend_id(friends); if (id != 0) { @@ -1856,7 +1858,9 @@ void Steam_Overlay::FriendDisconnect(Friend _friend) { PRINT_DEBUG("Steam_Overlay::FriendDisconnect " "%" PRIu64 "\n", _friend.id()); std::lock_guard lock(overlay_mutex); - if (!Ready()) return; + // players connections might happen earlier before the overlay is ready + // we don't want to miss them + //if (!Ready()) return; auto it = friends.find(_friend); if (it != friends.end())