Always report command ID in log and implement LoadUserSetting stub
This commit is contained in:
parent
a5a11e03a1
commit
0cb34b7bc3
2 changed files with 34 additions and 4 deletions
|
@ -62,7 +62,7 @@ public:
|
|||
{20600, nullptr, "GetUserPresenceView"},
|
||||
{20700, nullptr, "GetPlayHistoryList"},
|
||||
{20701, &IFriendService::GetPlayHistoryStatistics, "GetPlayHistoryStatistics"},
|
||||
{20800, nullptr, "LoadUserSetting"},
|
||||
{20800, &IFriendService::LoadUserSetting, "LoadUserSetting"},
|
||||
{20801, nullptr, "SyncUserSetting"},
|
||||
{20900, nullptr, "RequestListSummaryOverlayNotification"},
|
||||
{21000, nullptr, "GetExternalApplicationCatalog"},
|
||||
|
@ -136,6 +136,17 @@ private:
|
|||
};
|
||||
static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size");
|
||||
|
||||
struct FriendsUserSetting {
|
||||
Common::UUID uuid;
|
||||
u32 presence_permission;
|
||||
u32 play_log_permission;
|
||||
u64 friend_request_reception;
|
||||
char friend_code[0x20];
|
||||
u64 friend_code_next_issuable_time;
|
||||
u8 unk_x48[0x7C8];
|
||||
};
|
||||
static_assert(sizeof(FriendsUserSetting) == 0x810, "FriendsUserSetting is an invalid size");
|
||||
|
||||
void GetCompletionEvent(HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_Friend, "called");
|
||||
|
||||
|
@ -248,6 +259,25 @@ private:
|
|||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void LoadUserSetting(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto uuid = rp.PopRaw<Common::UUID>();
|
||||
|
||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||
|
||||
FriendsUserSetting setting{};
|
||||
setting.uuid = uuid;
|
||||
setting.presence_permission = 2;
|
||||
setting.play_log_permission = 5;
|
||||
setting.friend_request_reception = 1;
|
||||
setting.friend_code_next_issuable_time = 99999999999;
|
||||
strcpy(setting.friend_code, "0000-0000-0000");
|
||||
ctx.WriteBuffer(setting);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void GetReceivedFriendInvitationCountCache(HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_Friend, "(STUBBED) called, check in out");
|
||||
|
||||
|
|
|
@ -63,11 +63,11 @@ void ServiceFrameworkBase::RegisterHandlersBaseTipc(const FunctionInfoBase* func
|
|||
void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx,
|
||||
const FunctionInfoBase* info) {
|
||||
auto cmd_buf = ctx.CommandBuffer();
|
||||
std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name;
|
||||
std::string function_name = info == nullptr ? "<unknown>" : info->name;
|
||||
|
||||
fmt::memory_buffer buf;
|
||||
fmt::format_to(std::back_inserter(buf), "function '{}': port='{}' cmd_buf={{[0]=0x{:X}",
|
||||
function_name, service_name, cmd_buf[0]);
|
||||
fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]=0x{:X}",
|
||||
ctx.GetCommand(), function_name, service_name, cmd_buf[0]);
|
||||
for (int i = 1; i <= 8; ++i) {
|
||||
fmt::format_to(std::back_inserter(buf), ", [{}]=0x{:X}", i, cmd_buf[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue