|
|
@ -545,6 +545,7 @@ void SetPlayedWith( CSteamID steamIDUserPlayedWith )
|
|
|
|
void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby )
|
|
|
|
void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PRINT_DEBUG("Steam_Friends::ActivateGameOverlayInviteDialog\n");
|
|
|
|
PRINT_DEBUG("Steam_Friends::ActivateGameOverlayInviteDialog\n");
|
|
|
|
|
|
|
|
// TODO: Here open the overlay
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
|
|
|
|
// gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
|
|
|
@ -775,8 +776,14 @@ void RequestFriendRichPresence( CSteamID steamIDFriend )
|
|
|
|
bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString )
|
|
|
|
bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PRINT_DEBUG("Steam_Friends::InviteUserToGame\n");
|
|
|
|
PRINT_DEBUG("Steam_Friends::InviteUserToGame\n");
|
|
|
|
//TODO
|
|
|
|
Common_Message msg;
|
|
|
|
return true;
|
|
|
|
Friend_Messages *friend_messages = new Friend_Messages();
|
|
|
|
|
|
|
|
friend_messages->set_type(Friend_Messages::GAME_INVITE);
|
|
|
|
|
|
|
|
friend_messages->set_connect_str(pchConnectString);
|
|
|
|
|
|
|
|
msg.set_allocated_friend_messages(friend_messages);
|
|
|
|
|
|
|
|
msg.set_source_id(settings->get_local_steam_id().ConvertToUint64());
|
|
|
|
|
|
|
|
msg.set_dest_id(steamIDFriend.ConvertToUint64());
|
|
|
|
|
|
|
|
return network->sendTo(&msg, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1021,6 +1028,15 @@ void Callback(Common_Message *msg)
|
|
|
|
data.m_steamIDFriend = CSteamID((uint64)msg->source_id());
|
|
|
|
data.m_steamIDFriend = CSteamID((uint64)msg->source_id());
|
|
|
|
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
|
|
|
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (msg->friend_messages().type() == Friend_Messages::GAME_INVITE) {
|
|
|
|
|
|
|
|
PRINT_DEBUG("Steam_Friends Got Game Invite\n");
|
|
|
|
|
|
|
|
std::string const& connect_str = msg->friend_messages().connect_str();
|
|
|
|
|
|
|
|
GameRichPresenceJoinRequested_t data;
|
|
|
|
|
|
|
|
data.m_steamIDFriend = CSteamID((uint64)msg->source_id());
|
|
|
|
|
|
|
|
strncpy(data.m_rgchConnect, connect_str.c_str(), k_cchMaxRichPresenceValueLength);
|
|
|
|
|
|
|
|
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|