Make add_friend_avatars handle local_user avatar

... changes.

Implements STEAM_CALL_RESULT( AvatarImageLoaded_t ).
Adds support for a sending a STEAM_CALL_RESULT( PersonaStateChange_t ) with the k_EPersonaChangeAvatar flag.

Creates a mapping in Settings to hold the avatar image data.

Also adds additional debug logging to indicate which image handle is
returned for each user / image size.
This commit is contained in:
redpolline 2024-11-25 00:11:22 -05:00
parent 1408890d20
commit 0eaba52f76
3 changed files with 165 additions and 13 deletions

View file

@ -80,6 +80,7 @@ class Settings {
std::map<AppId_t, std::string> app_paths;
std::map<std::string, Leaderboard_config> leaderboards;
std::map<std::string, Stat_config> stats;
std::map<int, int> profile_images;
bool create_unknown_leaderboards;
uint16 port;
@ -147,6 +148,8 @@ public:
//images
std::map<int, struct Image_Data> images;
int add_image(std::string data, uint32 width, uint32 height);
int get_profile_image(int eAvatarSize);
int set_profile_image(int eAvatarSize, Image_Data * image);
//controller
struct Controller_Settings controller_settings;