From 69fae3b607ac42d8ab08439308c794fb5c58bbbe Mon Sep 17 00:00:00 2001 From: m4dengi Date: Thu, 12 Sep 2024 23:19:05 +0300 Subject: [PATCH] =?UTF-8?q?-=20Updated=20to=20support=20latest=20stable=20?= =?UTF-8?q?Steam=20Client=20-=20Added=20call=20to=20ShowRemotePlayTogether?= =?UTF-8?q?UI=20(=E2=9D=A4=EF=B8=8F=20)=20on=20successful=20remote=20sessi?= =?UTF-8?q?on=20invite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ RemotePlayWhatever/RemotePlayInviteHandler.cpp | 16 +++++++++------- open-steamworks | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3d8187a..1e17c9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ .vs/ +.vscode/ +.cache/ out/ build/ build_debug/ CMakeLists.txt.user* CMakeCache.txt +CMakeSettings.json CMakeFiles CMakeScripts Testing diff --git a/RemotePlayWhatever/RemotePlayInviteHandler.cpp b/RemotePlayWhatever/RemotePlayInviteHandler.cpp index eb9e808..6e9137f 100644 --- a/RemotePlayWhatever/RemotePlayInviteHandler.cpp +++ b/RemotePlayWhatever/RemotePlayInviteHandler.cpp @@ -57,14 +57,16 @@ void RemotePlayInviteHandler::SetGuestID(uint64 guestID) void RemotePlayInviteHandler::OnRemotePlayInviteResult(RemotePlayInviteResult_t* inviteResultCb) { - if (inviteResultCb->m_eResult == k_ERemoteClientLaunchResultOK && - inviteResultCb->m_player.m_playerID.IsValid() - ) + if (inviteResultCb->m_eResult == k_ERemoteClientLaunchResultOK) { - char* buf = new char[1280]; - sprintf(buf, "Follow this link to join remote game: %s", inviteResultCb->m_szConnectURL); - GClientContext()->SteamFriends()->ReplyToFriendMessage(inviteResultCb->m_player.m_playerID, buf); - delete[] buf; + if (inviteResultCb->m_player.m_playerID.IsValid()) + { + char* buf = new char[1280]; + sprintf(buf, "Follow this link to join remote game: %s", inviteResultCb->m_szConnectURL); + GClientContext()->SteamFriends()->ReplyToFriendMessage(inviteResultCb->m_player.m_playerID, buf); + delete[] buf; + } + GClientContext()->RemoteClientManager()->ShowRemotePlayTogetherUI(GetRunningGameID().AppID()); } } diff --git a/open-steamworks b/open-steamworks index e58af10..ae60ff3 160000 --- a/open-steamworks +++ b/open-steamworks @@ -1 +1 @@ -Subproject commit e58af104f8a32b95ba425fbc60efeb8a3040db7d +Subproject commit ae60ff362231f746d7ac79618714530053866e65