GodotSteam icon indicating copy to clipboard operation
GodotSteam copied to clipboard

Avatar Loaded callback doesn't map to Steamworks description

Open polyrain opened this issue 3 years ago • 2 comments
trafficstars

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.

polyrain avatar Sep 18 '22 22:09 polyrain

I'll get a test whipped up tonight! Thanks for the post.

Gramps avatar Sep 18 '22 22:09 Gramps

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

Kryx-Ikyr avatar Sep 19 '22 13:09 Kryx-Ikyr

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

polyrain avatar Oct 08 '22 09:10 polyrain

....did I make and send that test yet?

Gramps avatar Oct 08 '22 13:10 Gramps

....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 😅

polyrain avatar Oct 09 '22 01:10 polyrain

OK, that means I probably didn't... that's my bad. I'll get one made tomorrow and sent over!

Gramps avatar Oct 09 '22 02:10 Gramps

Pfft, this went out in the last update and I didn't close the issue!

Gramps avatar Oct 24 '22 17:10 Gramps