mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
Reset presence when terminating NP
This commit is contained in:
parent
ec3d9a2cae
commit
6074480ffb
2 changed files with 7 additions and 1 deletions
|
@ -854,6 +854,10 @@ namespace np
|
|||
room_msg_cb_ctx = 0;
|
||||
room_msg_cb_arg = {};
|
||||
|
||||
presence_self.pr_status = {};
|
||||
presence_self.pr_data = {};
|
||||
presence_self.advertised = false;
|
||||
|
||||
if (g_cfg.net.psn_status == np_psn_status::psn_rpcn)
|
||||
{
|
||||
rpcn_log.notice("Setting RPCN state to disconnected!");
|
||||
|
@ -1538,7 +1542,7 @@ namespace np
|
|||
}
|
||||
}
|
||||
|
||||
if (send_update && is_psn_active)
|
||||
if (is_psn_active && (!presence_self.advertised || send_update))
|
||||
{
|
||||
std::lock_guard lock(mutex_rpcn);
|
||||
|
||||
|
@ -1547,6 +1551,7 @@ namespace np
|
|||
return;
|
||||
}
|
||||
|
||||
presence_self.advertised = true;
|
||||
rpcn->send_presence(presence_self.pr_com_id, presence_self.pr_title, presence_self.pr_status, presence_self.pr_comment, presence_self.pr_data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -509,6 +509,7 @@ namespace np
|
|||
std::string pr_status;
|
||||
std::string pr_comment;
|
||||
std::vector<u8> pr_data;
|
||||
atomic_t<bool> advertised = false;
|
||||
} presence_self;
|
||||
|
||||
player_history& get_player_and_set_timestamp(const SceNpId& npid, u64 timestamp);
|
||||
|
|
Loading…
Add table
Reference in a new issue