mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-05 15:48:45 +00:00
fix: better handling of wivrn launch opts
This commit is contained in:
parent
0f3e6970bb
commit
9098800298
1 changed files with 9 additions and 8 deletions
|
@ -18,7 +18,9 @@ use std::{
|
||||||
thread,
|
thread,
|
||||||
};
|
};
|
||||||
|
|
||||||
static WIVRN_LAUNCH_OPTS: [&str; 2] = ["--no-instructions", "--no-manage-active-runtime"];
|
/// launch options that are desirable on wivrn, no way currently to remove them
|
||||||
|
/// but it should be fine
|
||||||
|
const WIVRN_LAUNCH_OPTS: [&str; 2] = ["--no-instructions", "--no-manage-active-runtime"];
|
||||||
|
|
||||||
macro_rules! logger_thread {
|
macro_rules! logger_thread {
|
||||||
($buf_fd: expr, $sender: expr) => {
|
($buf_fd: expr, $sender: expr) => {
|
||||||
|
@ -196,13 +198,12 @@ impl InternalJobWorker {
|
||||||
launch_opts
|
launch_opts
|
||||||
};
|
};
|
||||||
if prof.xrservice_type == XRServiceType::Wivrn {
|
if prof.xrservice_type == XRServiceType::Wivrn {
|
||||||
let mut opts = WIVRN_LAUNCH_OPTS.to_vec();
|
for wivrn_opt in WIVRN_LAUNCH_OPTS {
|
||||||
opts.retain(|opt| !launch_opts.contains(opt));
|
if !launch_opts.contains(wivrn_opt) {
|
||||||
|
|
||||||
opts.iter().for_each(|opt| {
|
|
||||||
launch_opts.push(' ');
|
launch_opts.push(' ');
|
||||||
launch_opts.push_str(opt);
|
launch_opts.push_str(wivrn_opt);
|
||||||
});
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let (command, args) = match launch_opts.is_empty() {
|
let (command, args) = match launch_opts.is_empty() {
|
||||||
false => (
|
false => (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue