Add option to enable/disable client commands per-app

This commit is contained in:
Yukino Song
2025-01-23 01:51:17 +08:00
parent d5f81773a8
commit 5aaeb70722
6 changed files with 36 additions and 5 deletions

View File

@@ -1148,6 +1148,11 @@ namespace nvhttp {
return;
}
if (!app_iter->allow_client_commands) {
launch_session->client_do_cmds.clear();
launch_session->client_undo_cmds.clear();
}
auto err = proc::proc.execute(appid, *app_iter, launch_session);
if (err) {
tree.put("root.<xmlattr>.status_code", err);
@@ -1224,6 +1229,11 @@ namespace nvhttp {
}
auto launch_session = make_launch_session(host_audio, 0, args, named_cert_p);
if (!proc::proc.allow_client_commands) {
launch_session->client_do_cmds.clear();
launch_session->client_undo_cmds.clear();
}
if (no_active_sessions && !proc::proc.virtual_display) {
// We want to prepare display only if there are no active sessions
// and the current session isn't virtual display at the moment.