Commit 4c91ebdd authored by Guillaume Charifi's avatar Guillaume Charifi

ISteamUserStats: Implement GetNumberOfCurrentPlayers().

Signed-off-by: Guillaume Charifi's avatarGuillaume Charifi <guillaume.charifi@sfr.fr>
parent 68d21c09
Pipeline #876 passed with stage
in 39 seconds
......@@ -513,6 +513,22 @@ MEMBER steam_api_call_t ISteamUserStats_FindLeaderboard(struct ISteamUserStats *
return api_call;
}
MEMBER steam_api_call_t ISteamUserStats_GetNumberOfCurrentPlayers(struct ISteamUserStats *iface)
{
struct ISteamUserStatsImpl *This = impl_from_ISteamUserStats(iface);
struct steam_callback_data_user_stats_number_of_current_players number_of_current_players;
steam_api_call_t api_call;
LOG_ENTER_NOTIMPL("(This = %p)", VOIDPTR(This));
number_of_current_players.success = 0;
number_of_current_players.player_count = 0;
api_call = callbacks_await_api_call_result_output();
callbacks_dispatch_api_call_result_output(api_call, STEAM_CALLBACK_TYPE_USER_STATS_NUMBER_OF_CURRENT_PLAYERS, STEAM_FALSE, &number_of_current_players, sizeof(number_of_current_players));
return api_call;
}
MEMBER steam_api_call_t ISteamUserStats_RequestGlobalStats(struct ISteamUserStats *iface, int history_days_count)
{
struct ISteamUserStatsImpl *This = impl_from_ISteamUserStats(iface);
......
......@@ -66,6 +66,12 @@ PACKED_STRUCT steam_callback_data_user_stats_leaderboard_find_result
steam_bool_t found;
};
PACKED_STRUCT steam_callback_data_user_stats_number_of_current_players
{
uint8_t success;
int32_t player_count;
};
PACKED_STRUCT steam_callback_data_user_stats_global_stats_received
{
union CGameID game_id;
......
......@@ -37,7 +37,7 @@ static const struct ISteamUserStats011Vtbl ISteamUserStats011_vtbl = {
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
ISteamUserStats_GetNumberOfCurrentPlayers,
INVAL_PTR,
INVAL_PTR,
INVAL_PTR,
......
......@@ -42,7 +42,7 @@ struct ISteamUserStats011Vtbl
void *GetDownloadedLeaderboardEntry;
void *UploadLeaderboardScore;
void *AttachLeaderboardUGC;
void *GetNumberOfCurrentPlayers;
MEMBER steam_api_call_t (*GetNumberOfCurrentPlayers)(struct ISteamUserStats *iface);
void *RequestGlobalAchievementPercentages;
void *GetMostAchievedAchievementInfo;
void *GetNextMostAchievedAchievementInfo;
......
......@@ -44,6 +44,7 @@ MEMBER steam_bool_t ISteamUserStats_IndicateAchievementProgress(struct ISteamUse
MEMBER steam_api_call_t ISteamUserStats_RequestUserStats(struct ISteamUserStats *iface, union CSteamID steam_id_user);
MEMBER steam_api_call_t ISteamUserStats_FindOrCreateLeaderboard(struct ISteamUserStats *iface, const char *name, enum steam_user_stats_leaderboard_sort_method sort_method, enum steam_user_stats_leaderboard_display_type display_type);
MEMBER steam_api_call_t ISteamUserStats_FindLeaderboard(struct ISteamUserStats *iface, const char *name);
MEMBER steam_api_call_t ISteamUserStats_GetNumberOfCurrentPlayers(struct ISteamUserStats *iface);
MEMBER steam_api_call_t ISteamUserStats_RequestGlobalStats(struct ISteamUserStats *iface, int history_days_count);
MEMBER steam_bool_t ISteamUserStats_GetGlobalStatI64(struct ISteamUserStats *iface, const char *name, int64_t *data);
MEMBER steam_bool_t ISteamUserStats_GetGlobalStatDouble(struct ISteamUserStats *iface, const char *name, double *data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment