mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Merge 1018e6a7dd
into 8437a5f5ac
This commit is contained in:
commit
6ce01adf1d
2 changed files with 31 additions and 2 deletions
|
@ -1497,12 +1497,26 @@ namespace np
|
|||
|
||||
u32 np_handler::get_num_friends()
|
||||
{
|
||||
return get_rpcn()->get_num_friends();
|
||||
if (g_cfg.net.psn_status != np_psn_status::psn_rpcn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return get_rpcn()->get_num_friends();
|
||||
}
|
||||
}
|
||||
|
||||
u32 np_handler::get_num_blocks()
|
||||
{
|
||||
return get_rpcn()->get_num_blocks();
|
||||
if (g_cfg.net.psn_status != np_psn_status::psn_rpcn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return get_rpcn()->get_num_blocks();
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<error_code, std::optional<SceNpId>> np_handler::get_friend_by_index(u32 index)
|
||||
|
|
|
@ -843,6 +843,21 @@ namespace np
|
|||
cookie_vec.assign(cookie, cookie + cookie_size);
|
||||
}
|
||||
|
||||
if (g_cfg.net.psn_status != np_psn_status::psn_rpcn)
|
||||
{
|
||||
// TODO(InvoxiPlayGames): generate ticket data that is valid, for games that need to dig into the data
|
||||
std::vector<u8> ticketdata = {0x41, 0x42, 0x43, 0x44};
|
||||
current_ticket = ticket(std::move(ticketdata));
|
||||
auto ticket_size = static_cast<s32>(current_ticket.size());
|
||||
|
||||
sysutil_register_cb([manager_cb = this->manager_cb, ticket_size, manager_cb_arg = this->manager_cb_arg](ppu_thread& cb_ppu) -> s32
|
||||
{
|
||||
manager_cb(cb_ppu, SCE_NP_MANAGER_EVENT_GOT_TICKET, ticket_size, manager_cb_arg);
|
||||
return 0;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!get_rpcn()->req_ticket(req_id, service_id_str, cookie_vec))
|
||||
{
|
||||
rpcn_log.error("Disconnecting from RPCN!");
|
||||
|
|
Loading…
Add table
Reference in a new issue