GodotSteam
GodotSteam copied to clipboard
Avatar Loaded callback doesn't map to Steamworks description
Currently in GodotSteam, the avatar_loaded callback gives connected methods the Steam ID of the player changed, the size of the square image, and the actual data buffer of the loaded avatar.
This is different from the Steamworks description of how this callback works; instead, Steamworks returns the Steam ID, an index into the image cache, and the height and width as separate values. Read more here: https://partner.steamgames.com/doc/api/ISteamFriends#AvatarImageLoaded_t
We should add a new callback to map this more accurately without breaking old code. This is low urgency.
I'll get a test whipped up tonight! Thanks for the post.
There is a lot of GodotSteam methods that doesn't match the Steamworks API, for multiple reasons (typically pointers are not availables in gdscript). Godotsteam handle this index internally to get the cache and call the avatar_loaded signal with the data fetched from the cache for you. Do you need this index for your use case? If not, there is no need to change it I think...
see https://github.com/Gramps/GodotSteam/blob/master/godotsteam/godotsteam.cpp#L8835 and https://github.com/Gramps/GodotSteam/blob/master/godotsteam/godotsteam.cpp#L8496
There is a lot of GodotSteam methods that doesn't match the Steamworks API, for multiple reasons (typically pointers are not availables in gdscript). Godotsteam handle this index internally to get the cache and call the avatar_loaded signal with the data fetched from the cache for you. Do you need this index for your use case? If not, there is no need to change it I think...
see https://github.com/Gramps/GodotSteam/blob/master/godotsteam/godotsteam.cpp#L8835 and https://github.com/Gramps/GodotSteam/blob/master/godotsteam/godotsteam.cpp#L8496
I do need the index, yes, hence why I made the issue
....did I make and send that test yet?
....did I make and send that test yet?
Not yet I don't think; I've been MIA from doing Dev for a bit so it's not been a priority 😅
OK, that means I probably didn't... that's my bad. I'll get one made tomorrow and sent over!
Pfft, this went out in the last update and I didn't close the issue!