From 20f99a5e1097317fc12f752d793c07dece517f70 Mon Sep 17 00:00:00 2001 From: mordentral Date: Fri, 17 Aug 2018 14:33:19 -0400 Subject: [PATCH] Removing a test I had been doing like a year ago from GetFriendGamePlayed function Former-commit-id: 7e0d599ed253f90b789850578accda5d89c1f0d6 --- .../Classes/AdvancedSteamFriendsLibrary.h | 5 ++--- .../Private/AdvancedSteamFriendsLibrary.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/AdvancedSteamSessions/Source/AdvancedSteamSessions/Classes/AdvancedSteamFriendsLibrary.h b/AdvancedSteamSessions/Source/AdvancedSteamSessions/Classes/AdvancedSteamFriendsLibrary.h index 6a2962c..390d596 100644 --- a/AdvancedSteamSessions/Source/AdvancedSteamSessions/Classes/AdvancedSteamFriendsLibrary.h +++ b/AdvancedSteamSessions/Source/AdvancedSteamSessions/Classes/AdvancedSteamFriendsLibrary.h @@ -297,11 +297,10 @@ public: static FBPUniqueNetId CreateSteamIDFromString(const FString SteamID64); /* Gets the current game played by a friend - AppID is int32 even though steam ids are uint32, can't be helped in blueprint currently - * The game name is retrieved from steamSDK AppList which isn't available to all game IDs without request, can use the AppID with the - * WebAPI GetAppList request as an alternative. + * can use the AppID with the WebAPI GetAppList request. */ UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI", meta = (ExpandEnumAsExecs = "Result")) - static void GetSteamFriendGamePlayed(const FBPUniqueNetId UniqueNetId, EBlueprintResultSwitch &Result, FString & GameName, int32 & AppID); + static void GetSteamFriendGamePlayed(const FBPUniqueNetId UniqueNetId, EBlueprintResultSwitch &Result/*, FString & GameName*/, int32 & AppID); // Get a full list of steam groups UFUNCTION(BlueprintCallable, Category = "Online|SteamAPI|SteamGroups") diff --git a/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp b/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp index 6e3ad1f..3923627 100644 --- a/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp +++ b/AdvancedSteamSessions/Source/AdvancedSteamSessions/Private/AdvancedSteamFriendsLibrary.cpp @@ -87,7 +87,7 @@ void UAdvancedSteamFriendsLibrary::GetSteamGroups(TArray & St } -void UAdvancedSteamFriendsLibrary::GetSteamFriendGamePlayed(const FBPUniqueNetId UniqueNetId, EBlueprintResultSwitch &Result, FString & GameName, int32 & AppID) +void UAdvancedSteamFriendsLibrary::GetSteamFriendGamePlayed(const FBPUniqueNetId UniqueNetId, EBlueprintResultSwitch &Result/*, FString & GameName*/, int32 & AppID) { #if PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX @@ -109,13 +109,15 @@ void UAdvancedSteamFriendsLibrary::GetSteamFriendGamePlayed(const FBPUniqueNetId { AppID = GameInfo.m_gameID.AppID(); - char NameBuffer[512]; + // Forgot this test and left it in, it is incorrect, you would need restricted access + // And it would only find games in the local library anyway + /*char NameBuffer[512]; int Len = SteamAppList()->GetAppName(GameInfo.m_gameID.AppID(), NameBuffer, 512); if (Len != -1) // Invalid { GameName = FString(UTF8_TO_TCHAR(NameBuffer)); - } + }*/ Result = EBlueprintResultSwitch::OnSuccess; return;