mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
Merge 1018e6a7dd
into 2afd7707fe
This commit is contained in:
commit
6de529dd8e
2 changed files with 31 additions and 2 deletions
|
@ -1497,12 +1497,26 @@ namespace np
|
||||||
|
|
||||||
u32 np_handler::get_num_friends()
|
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()
|
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)
|
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);
|
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))
|
if (!get_rpcn()->req_ticket(req_id, service_id_str, cookie_vec))
|
||||||
{
|
{
|
||||||
rpcn_log.error("Disconnecting from RPCN!");
|
rpcn_log.error("Disconnecting from RPCN!");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue