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:
parent
512cce6ed3
commit
b4f8ae7a75
1 changed files with 40 additions and 1 deletions
|
@ -120,6 +120,45 @@ namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator
|
||||||
return ResultCode.Success;
|
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)]
|
[CommandHipc(10400)]
|
||||||
// nn::friends::GetBlockedUserListIds(int offset, nn::account::Uid userId) -> (u32, buffer<nn::account::NetworkServiceAccountId, 0xa>)
|
// nn::friends::GetBlockedUserListIds(int offset, nn::account::Uid userId) -> (u32, buffer<nn::account::NetworkServiceAccountId, 0xa>)
|
||||||
public ResultCode GetBlockedUserListIds(ServiceCtx context)
|
public ResultCode GetBlockedUserListIds(ServiceCtx context)
|
||||||
|
@ -311,4 +350,4 @@ namespace Ryujinx.HLE.HOS.Services.Friend.ServiceCreator
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue