1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02:00

friend: Stub IsFriendListCacheAvailable and EnsureFriendListAvailable (#2949)

* friend: Stub IsFriendListCacheAvailable and EnsureFriendListAvailable

This PR stubs IsFriendListCacheAvailable and EnsureFriendListAvailable call of friend service which close #2896.

Sadly, Super Bomberman R Online is still stuck on the loading screen and keep calling `TryPopFromFriendInvitationStorageChannel`, probably because another issue somewhere.

* Add FW version

* Apply suggestions from gdkchan

Co-authored-by: gdkchan <gab.dark.100@gmail.com>

* Update IFriendService.cs

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
Ac_K 2021-12-30 11:42:22 +01:00 committed by GitHub
parent 512cce6ed3
commit b4f8ae7a75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,45 @@ namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator
return ResultCode.Success;
}
[CommandHipc(10120)] // 10.0.0+
// nn::friends::IsFriendListCacheAvailable(nn::account::Uid userId) -> bool
public ResultCode IsFriendListCacheAvailable(ServiceCtx context)
{
UserId userId = context.RequestData.ReadStruct<UserId>();
if (userId.IsNull)
{
return ResultCode.InvalidArgument;
}
// TODO: Service mount the friends:/ system savedata and try to load friend.cache file, returns true if exists, false otherwise.
// NOTE: If no cache is available, guest then calls nn::friends::EnsureFriendListAvailable, we can avoid that by faking the cache check.
context.ResponseData.Write(true);
// TODO: Since we don't support friend features, it's fine to stub it for now.
Logger.Stub?.PrintStub(LogClass.ServiceFriend, new { UserId = userId.ToString() });
return ResultCode.Success;
}
[CommandHipc(10121)] // 10.0.0+
// nn::friends::EnsureFriendListAvailable(nn::account::Uid userId)
public ResultCode EnsureFriendListAvailable(ServiceCtx context)
{
UserId userId = context.RequestData.ReadStruct<UserId>();
if (userId.IsNull)
{
return ResultCode.InvalidArgument;
}
// TODO: Service mount the friends:/ system savedata and create a friend.cache file for the given user id.
// Since we don't support friend features, it's fine to stub it for now.
Logger.Stub?.PrintStub(LogClass.ServiceFriend, new { UserId = userId.ToString() });
return ResultCode.Success;
}
[CommandHipc(10400)]
// nn::friends::GetBlockedUserListIds(int offset, nn::account::Uid userId) -> (u32, buffer<nn::account::NetworkServiceAccountId, 0xa>)
public ResultCode GetBlockedUserListIds(ServiceCtx context)
@ -311,4 +350,4 @@ namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator
return ResultCode.Success;
}
}
}
}