New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid current app from showing up as "???" for others in Friend List + View friends' status #1157
Conversation
- Implement GetMyPlayingGame - In StartFriendSession, the gameKey will be 0 if the current foreground title id does not start with 0x00050000 (game application)
- In NexFriends::updateMyPresence, the gameKey will be 0 if the current foreground title id does not start with 0x00050000 (game application)
I forgot to change the other instance of gameModeMessage in nexFriend.readData causing the build to fail, sorry about that! |
src/Cafe/IOSU/legacy/iosu_fpd.cpp
Outdated
|
||
auto comment_utf16 = StringHelpers::FromUtf8(frd->comment.commentString); | ||
comment_utf16.insert(0, 1, '\0'); // avoid first character of comment from being cut off | ||
memcpy(friendData->friendExtraData.comment, comment_utf16.c_str(), 36); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have friendExtraData.comment
defined as a char array, but here you are assigning it the bytes from a wide string. If this is working then we should redefine friendExtraData.comment
as the proper string type. Consider using the helper class CafeWideString
since that avoids having to manually memcpy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defined friendExtraData.comment
as CafeWideString<0x12>
and now using assignFromUTF8
instead of memcpy
, still works. 👍
thanks! |
iosu_fpd.cpp, nexFriends.cpp and nexFriends.h are edited to have these changes: