mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Reset presence when terminating NP
Some checks are pending
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.0, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.0, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.0, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / Windows_Build (push) Waiting to run
Some checks are pending
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.0, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.0, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.0, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / Windows_Build (push) Waiting to run
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_ctx = 0;
|
||||||
room_msg_cb_arg = {};
|
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)
|
if (g_cfg.net.psn_status == np_psn_status::psn_rpcn)
|
||||||
{
|
{
|
||||||
rpcn_log.notice("Setting RPCN state to disconnected!");
|
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);
|
std::lock_guard lock(mutex_rpcn);
|
||||||
|
|
||||||
|
@ -1547,6 +1551,7 @@ namespace np
|
||||||
return;
|
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);
|
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_status;
|
||||||
std::string pr_comment;
|
std::string pr_comment;
|
||||||
std::vector<u8> pr_data;
|
std::vector<u8> pr_data;
|
||||||
|
atomic_t<bool> advertised = false;
|
||||||
} presence_self;
|
} presence_self;
|
||||||
|
|
||||||
player_history& get_player_and_set_timestamp(const SceNpId& npid, u64 timestamp);
|
player_history& get_player_and_set_timestamp(const SceNpId& npid, u64 timestamp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue