mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-20 03:24:52 +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,
|
||||
};
|
||||
|
||||
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 {
|
||||
($buf_fd: expr, $sender: expr) => {
|
||||
|
@ -196,13 +198,12 @@ impl InternalJobWorker {
|
|||
launch_opts
|
||||
};
|
||||
if prof.xrservice_type == XRServiceType::Wivrn {
|
||||
let mut opts = WIVRN_LAUNCH_OPTS.to_vec();
|
||||
opts.retain(|opt| !launch_opts.contains(opt));
|
||||
|
||||
opts.iter().for_each(|opt| {
|
||||
launch_opts.push(' ');
|
||||
launch_opts.push_str(opt);
|
||||
});
|
||||
for wivrn_opt in WIVRN_LAUNCH_OPTS {
|
||||
if !launch_opts.contains(wivrn_opt) {
|
||||
launch_opts.push(' ');
|
||||
launch_opts.push_str(wivrn_opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
let (command, args) = match launch_opts.is_empty() {
|
||||
false => (
|
||||
|
|
Loading…
Add table
Reference in a new issue