Skip to content

Commit

Permalink
- Updated to support latest stable Steam Client
Browse files Browse the repository at this point in the history
- Added call to ShowRemotePlayTogetherUI (❤️ ) on successful remote session invite
  • Loading branch information
m4dEngi committed Sep 12, 2024
1 parent 1c64dbb commit 69fae3b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.vs/
.vscode/
.cache/
out/
build/
build_debug/
CMakeLists.txt.user*
CMakeCache.txt
CMakeSettings.json
CMakeFiles
CMakeScripts
Testing
Expand Down
16 changes: 9 additions & 7 deletions RemotePlayWhatever/RemotePlayInviteHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down
2 changes: 1 addition & 1 deletion open-steamworks

0 comments on commit 69fae3b

Please sign in to comment.