mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-08 09:08:47 +00:00
Merge branch 'fix/wivrn-no-override-openvr' into 'main'
fix: prevent wivrn from overriding openvr runtime See merge request gabmus/envision!112
This commit is contained in:
commit
4f3779b721
1 changed files with 12 additions and 3 deletions
|
@ -3,7 +3,7 @@ use super::{
|
||||||
state::JobWorkerState,
|
state::JobWorkerState,
|
||||||
};
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
profile::{LighthouseDriver, Profile},
|
profile::{LighthouseDriver, Profile, XRServiceType},
|
||||||
ui::SENDER_IO_ERR_MSG,
|
ui::SENDER_IO_ERR_MSG,
|
||||||
};
|
};
|
||||||
use nix::unistd::Pid;
|
use nix::unistd::Pid;
|
||||||
|
@ -18,6 +18,10 @@ use std::{
|
||||||
thread,
|
thread,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// 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) => {
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
|
@ -193,8 +197,13 @@ impl InternalJobWorker {
|
||||||
} else {
|
} else {
|
||||||
launch_opts
|
launch_opts
|
||||||
};
|
};
|
||||||
if !launch_opts.contains(" --no-instructions") {
|
if prof.xrservice_type == XRServiceType::Wivrn {
|
||||||
launch_opts.push_str(" --no-instructions");
|
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() {
|
let (command, args) = match launch_opts.is_empty() {
|
||||||
false => (
|
false => (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue