Merge Staging into main (#130)
* config: add use_passthrough * do not use ALPHA_BLEND if passthrough is off * keyboard.yaml auto_labels * OSC: Finish XSOverlay parity (#124) * osc-battery - utilise match return value to set parameter this just lets parameter be a `&str` instead of a `String`, and reduces repetition. * osc-battery - fix error where trackers were 1-indexed instead of 0-indexed * osc-battery: xsoverlay parity! add average tracker and controller battery parameters. this should now be in parity with xsoverlay's parameters. gone back to 1-indexing trackers because it's more user-friendly, so other programs can standardise more easily. * osc battery: ...that was not 1-indexed. no idea how I made that mistake but the sent tracker parameters were actually still 0-indexed. * Update Envision section (#123) add directions for appimage autostart * Add Flatpak instructions (#127) * Add Flatpak instructions fix small inconsistencies between instructions * Clarify Flatpak Steam setup for SteamVR and Monado/WiVRn users * Additional instructions * default AltLayout is None * WayVR: IPC [1]: Local socket server, handshake receiver * WayVR : IPC [2]: `ListDisplays`, `GetDisplay` commands * WayVR: IPC [3]: `ListProcesses`, `TerminateProcess` commands * WayVR: IPC [4]: Minor refactoring * WayVR: Move IPC to separate Git repository * Restore default features in Cargo.toml * WayVR: Implement `WvrDisplayCreate`, Implement `WvrProcessLaunch`, Refactoring * WayVR: Dashboard toggle support, minor refactoring * Update Cargo.toml * fix formatting for openxr_actions.json5 --------- Co-authored-by: galister <22305755+galister@users.noreply.github.com> Co-authored-by: Jay <157681441+cubee-cb@users.noreply.github.com> Co-authored-by: Marcus Howser <mhowser.git@mailbox.org> Co-authored-by: Joshua Vandaële <joshua@vandaele.software>
This commit is contained in:
@@ -30,16 +30,17 @@ const PATH_HAPTICS: [&str; 2] = [
|
||||
"/actions/default/out/HapticsRight",
|
||||
];
|
||||
|
||||
const PATH_ALT_CLICK: &str = "/actions/default/in/AltClick";
|
||||
const PATH_CLICK_MODIFIER_MIDDLE: &str = "/actions/default/in/ClickModifierMiddle";
|
||||
const PATH_CLICK_MODIFIER_RIGHT: &str = "/actions/default/in/ClickModifierRight";
|
||||
const PATH_CLICK: &str = "/actions/default/in/Click";
|
||||
const PATH_GRAB: &str = "/actions/default/in/Grab";
|
||||
const PATH_MOVE_MOUSE: &str = "/actions/default/in/MoveMouse";
|
||||
const PATH_SCROLL: &str = "/actions/default/in/Scroll";
|
||||
const PATH_ALT_CLICK: &str = "/actions/default/in/AltClick";
|
||||
const PATH_SHOW_HIDE: &str = "/actions/default/in/ShowHide";
|
||||
const PATH_SPACE_DRAG: &str = "/actions/default/in/SpaceDrag";
|
||||
const PATH_SPACE_ROTATE: &str = "/actions/default/in/SpaceRotate";
|
||||
const PATH_CLICK_MODIFIER_RIGHT: &str = "/actions/default/in/ClickModifierRight";
|
||||
const PATH_CLICK_MODIFIER_MIDDLE: &str = "/actions/default/in/ClickModifierMiddle";
|
||||
const PATH_MOVE_MOUSE: &str = "/actions/default/in/MoveMouse";
|
||||
const PATH_TOGGLE_DASHBOARD: &str = "/actions/default/in/ToggleDashboard";
|
||||
|
||||
const INPUT_ANY: InputValueHandle = InputValueHandle(ovr_overlay::sys::k_ulInvalidInputValueHandle);
|
||||
|
||||
@@ -51,6 +52,7 @@ pub(super) struct OpenVrInputSource {
|
||||
scroll_hnd: ActionHandle,
|
||||
alt_click_hnd: ActionHandle,
|
||||
show_hide_hnd: ActionHandle,
|
||||
toggle_dashboard_hnd: ActionHandle,
|
||||
space_drag_hnd: ActionHandle,
|
||||
space_rotate_hnd: ActionHandle,
|
||||
click_modifier_right_hnd: ActionHandle,
|
||||
@@ -75,6 +77,7 @@ impl OpenVrInputSource {
|
||||
let scroll_hnd = input.get_action_handle(PATH_SCROLL)?;
|
||||
let alt_click_hnd = input.get_action_handle(PATH_ALT_CLICK)?;
|
||||
let show_hide_hnd = input.get_action_handle(PATH_SHOW_HIDE)?;
|
||||
let toggle_dashboard_hnd = input.get_action_handle(PATH_TOGGLE_DASHBOARD)?;
|
||||
let space_drag_hnd = input.get_action_handle(PATH_SPACE_DRAG)?;
|
||||
let space_rotate_hnd = input.get_action_handle(PATH_SPACE_ROTATE)?;
|
||||
let click_modifier_right_hnd = input.get_action_handle(PATH_CLICK_MODIFIER_RIGHT)?;
|
||||
@@ -111,6 +114,7 @@ impl OpenVrInputSource {
|
||||
scroll_hnd,
|
||||
alt_click_hnd,
|
||||
show_hide_hnd,
|
||||
toggle_dashboard_hnd,
|
||||
space_drag_hnd,
|
||||
space_rotate_hnd,
|
||||
click_modifier_right_hnd,
|
||||
@@ -196,6 +200,11 @@ impl OpenVrInputSource {
|
||||
.map(|x| x.0.bState)
|
||||
.unwrap_or(false);
|
||||
|
||||
app_hand.now.toggle_dashboard = input
|
||||
.get_digital_action_data(self.toggle_dashboard_hnd, hand.input_hnd)
|
||||
.map(|x| x.0.bState)
|
||||
.unwrap_or(false);
|
||||
|
||||
app_hand.now.space_drag = input
|
||||
.get_digital_action_data(self.space_drag_hnd, hand.input_hnd)
|
||||
.map(|x| x.0.bState)
|
||||
|
||||
@@ -12,7 +12,7 @@ use vulkano::image::view::ImageView;
|
||||
use vulkano::image::ImageLayout;
|
||||
|
||||
use crate::backend::overlay::{
|
||||
FrameTransform, OverlayData, OverlayRenderer, OverlayState, SplitOverlayBackend,
|
||||
FrameTransform, OverlayData, OverlayRenderer, OverlayState, SplitOverlayBackend, Z_ORDER_LINES,
|
||||
};
|
||||
use crate::graphics::WlxGraphics;
|
||||
use crate::state::AppState;
|
||||
@@ -82,7 +82,7 @@ impl LinePool {
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
data.state.z_order = 69;
|
||||
data.state.z_order = Z_ORDER_LINES;
|
||||
data.state.dirty = true;
|
||||
|
||||
self.lines.insert(id, data);
|
||||
|
||||
@@ -43,7 +43,7 @@ use crate::{
|
||||
};
|
||||
|
||||
#[cfg(feature = "wayvr")]
|
||||
use crate::overlays::wayvr::wayvr_action;
|
||||
use crate::overlays::wayvr::{wayvr_action, WayVRAction};
|
||||
|
||||
pub mod helpers;
|
||||
pub mod input;
|
||||
@@ -293,6 +293,16 @@ pub fn openvr_run(running: Arc<AtomicBool>, show_by_default: bool) -> Result<(),
|
||||
overlays.show_hide(&mut state);
|
||||
}
|
||||
|
||||
#[cfg(feature = "wayvr")]
|
||||
if state
|
||||
.input_state
|
||||
.pointers
|
||||
.iter()
|
||||
.any(|p| p.now.toggle_dashboard && !p.before.toggle_dashboard)
|
||||
{
|
||||
wayvr_action(&mut state, &mut overlays, &WayVRAction::ToggleDashboard);
|
||||
}
|
||||
|
||||
overlays
|
||||
.iter_mut()
|
||||
.for_each(|o| o.state.auto_movement(&mut state));
|
||||
@@ -346,7 +356,7 @@ pub fn openvr_run(running: Arc<AtomicBool>, show_by_default: bool) -> Result<(),
|
||||
|
||||
#[cfg(feature = "wayvr")]
|
||||
if let Some(wayvr) = &state.wayvr {
|
||||
wayvr.borrow_mut().state.tick_finish()?;
|
||||
wayvr.borrow_mut().data.tick_finish()?;
|
||||
}
|
||||
|
||||
// chaperone
|
||||
|
||||
Reference in New Issue
Block a user