From 3f44827326eff6d9cc385c27f0bded89ee7642ea Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Mon, 20 Jan 2020 11:48:15 -0500 Subject: [PATCH] Basic JoinClanChatRoom implementation. --- dll/steam_friends.h | 11 ++++++++--- dll/steam_inventory.h | 2 +- dll/steam_utils.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dll/steam_friends.h b/dll/steam_friends.h index a74931f..5c5e8c7 100644 --- a/dll/steam_friends.h +++ b/dll/steam_friends.h @@ -481,7 +481,7 @@ SteamAPICall_t DownloadClanActivityCounts( STEAM_ARRAY_COUNT(cClansToRequest) CS // steamIDSource can be the steamID of a group, game server, lobby or chat room int GetFriendCountFromSource( CSteamID steamIDSource ) { - PRINT_DEBUG("Steam_Friends::GetFriendCountFromSource\n"); + PRINT_DEBUG("Steam_Friends::GetFriendCountFromSource %llu\n", steamIDSource.ConvertToUint64()); //TODO return 0; } @@ -866,8 +866,13 @@ AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) STEAM_CALL_RESULT( JoinClanChatRoomCompletionResult_t ) SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) { - PRINT_DEBUG("Steam_Friends::JoinClanChatRoom\n"); - return 0; + PRINT_DEBUG("Steam_Friends::JoinClanChatRoom %llu\n", steamIDClan.ConvertToUint64()); + //TODO actually join a room + std::lock_guard lock(global_mutex); + JoinClanChatRoomCompletionResult_t data; + data.m_steamIDClanChat = steamIDClan; + data.m_eChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess; + return callback_results->addCallResult(data.k_iCallback, &data, sizeof(data)); } bool LeaveClanChatRoom( CSteamID steamIDClan ) diff --git a/dll/steam_inventory.h b/dll/steam_inventory.h index 3bd8f6e..7d28df7 100644 --- a/dll/steam_inventory.h +++ b/dll/steam_inventory.h @@ -591,7 +591,7 @@ bool GetItemDefinitionIDs( STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs, STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) { - PRINT_DEBUG("GetItemDefinitionIDs\n"); + PRINT_DEBUG("GetItemDefinitionIDs %p\n", pItemDefIDs); std::lock_guard lock(global_mutex); if (!punItemDefIDsArraySize) return false; diff --git a/dll/steam_utils.h b/dll/steam_utils.h index fa6389d..69c320b 100644 --- a/dll/steam_utils.h +++ b/dll/steam_utils.h @@ -189,7 +189,7 @@ bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCal // Deprecated. Applications should use SteamAPI_RunCallbacks() instead. Game servers do not need to call this function. STEAM_PRIVATE_API( void RunFrame() { - PRINT_DEBUG("RunFrame\n"); + PRINT_DEBUG("Steam_Utils::RunFrame\n"); } )