From 1ae098331da368a6de0531e8d43bd73c915bd6b2 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 8 Apr 2025 19:20:35 +0200 Subject: [PATCH] Fix new `IOnlinePlatform` leaderboards api to be empty for backwards compatibility #3357 --- Source/Engine/Online/IOnlinePlatform.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Engine/Online/IOnlinePlatform.h b/Source/Engine/Online/IOnlinePlatform.h index 6ab89c04f..7db49dda4 100644 --- a/Source/Engine/Online/IOnlinePlatform.h +++ b/Source/Engine/Online/IOnlinePlatform.h @@ -327,7 +327,7 @@ public: /// The result value. /// The local user (null if use default one). /// True if failed, otherwise false. - API_FUNCTION() virtual bool GetLeaderboard(const StringView& name, API_PARAM(Out) OnlineLeaderboard& value, User* localUser = nullptr) = 0; + API_FUNCTION() virtual bool GetLeaderboard(const StringView& name, API_PARAM(Out) OnlineLeaderboard& value, User* localUser = nullptr) { return true; } /// /// Gets or creates the online leaderboard. It will not create it if already exists. @@ -338,7 +338,7 @@ public: /// The result value. /// The local user (null if use default one). /// True if failed, otherwise false. - API_FUNCTION() virtual bool GetOrCreateLeaderboard(const StringView& name, OnlineLeaderboardSortModes sortMode, OnlineLeaderboardValueFormats valueFormat, API_PARAM(Out) OnlineLeaderboard& value, User* localUser = nullptr) = 0; + API_FUNCTION() virtual bool GetOrCreateLeaderboard(const StringView& name, OnlineLeaderboardSortModes sortMode, OnlineLeaderboardValueFormats valueFormat, API_PARAM(Out) OnlineLeaderboard& value, User* localUser = nullptr) { return true; } /// /// Gets the online leaderboard entries. Allows to specify the range for ranks to gather. @@ -348,7 +348,7 @@ public: /// The zero-based index to start downloading entries from. For example, to display the top 10 on a leaderboard pass value of 0. /// The amount of entries to read, starting from the first entry at . /// True if failed, otherwise false. - API_FUNCTION() virtual bool GetLeaderboardEntries(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries, int32 start = 0, int32 count = 10) = 0; + API_FUNCTION() virtual bool GetLeaderboardEntries(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries, int32 start = 0, int32 count = 10) { return true; } /// /// Gets the online leaderboard entries around the player. Allows to specify the range for ranks to gather around the user rank. The current user's entry is always included. @@ -358,7 +358,7 @@ public: /// The zero-based index to start downloading entries relative to the user. For example, to display the 4 higher scores on a leaderboard pass value of -4. Value 0 will return current user as the first one. /// The amount of entries to read, starting from the first entry at . /// True if failed, otherwise false. - API_FUNCTION() virtual bool GetLeaderboardEntriesAroundUser(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries, int32 start = -4, int32 count = 10) = 0; + API_FUNCTION() virtual bool GetLeaderboardEntriesAroundUser(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries, int32 start = -4, int32 count = 10) { return true; } /// /// Gets the online leaderboard entries for player friends. @@ -366,7 +366,7 @@ public: /// The leaderboard. /// The list of result entries. /// True if failed, otherwise false. - API_FUNCTION() virtual bool GetLeaderboardEntriesForFriends(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries) = 0; + API_FUNCTION() virtual bool GetLeaderboardEntriesForFriends(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries) { return true; } /// /// Gets the online leaderboard entries for an arbitrary set of users. @@ -375,7 +375,7 @@ public: /// The list of result entries. /// The list of users to read their ranks on the leaderboard. /// True if failed, otherwise false. - API_FUNCTION() virtual bool GetLeaderboardEntriesForUsers(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries, const Array& users) = 0; + API_FUNCTION() virtual bool GetLeaderboardEntriesForUsers(const OnlineLeaderboard& leaderboard, API_PARAM(Out) Array& entries, const Array& users) { return true; } /// /// Sets the online leaderboard entry for the user. @@ -384,7 +384,7 @@ public: /// The score value to set. /// True if store value only if it's better than existing value (if any), otherwise will override any existing score for that user. /// True if failed, otherwise false. - API_FUNCTION() virtual bool SetLeaderboardEntry(const OnlineLeaderboard& leaderboard, int32 score, bool keepBest = false) = 0; + API_FUNCTION() virtual bool SetLeaderboardEntry(const OnlineLeaderboard& leaderboard, int32 score, bool keepBest = false) { return true; } public: ///