Ignore non-owner client input policy updates
This commit is contained in:
parent
69c2693984
commit
808d868b8e
1 changed files with 13 additions and 6 deletions
|
|
@ -1171,12 +1171,19 @@ namespace stream {
|
|||
}
|
||||
|
||||
auto *policy = (const control_set_input_policy_t *) payload.data();
|
||||
apply_session_input_policy(
|
||||
session,
|
||||
policy->allow_keyboard != 0,
|
||||
policy->allow_mouse != 0,
|
||||
policy->allow_gamepad != 0,
|
||||
policy->reason);
|
||||
bool is_owner_session = session->input_policy.is_owner_session.load(std::memory_order_relaxed);
|
||||
if (!is_owner_session) {
|
||||
BOOST_LOG(info)
|
||||
<< "Ignoring client input policy update from non-owner session [id="sv << session->launch_session_id
|
||||
<< ", client="sv << session->client_unique_id << "]"sv;
|
||||
} else {
|
||||
apply_session_input_policy(
|
||||
session,
|
||||
policy->allow_keyboard != 0,
|
||||
policy->allow_mouse != 0,
|
||||
policy->allow_gamepad != 0,
|
||||
policy->reason);
|
||||
}
|
||||
|
||||
if (send_session_input_policy(session, INPUT_POLICY_REASON_HOST_ACK)) {
|
||||
BOOST_LOG(warning) << "Unable to send input policy acknowledgment"sv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue