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:
Aleksander
2025-01-11 09:46:54 +01:00
committed by GitHub
parent ab6b5c0b46
commit eb3087f230
24 changed files with 1281 additions and 292 deletions

View File

@@ -154,6 +154,7 @@ pub(super) struct OpenXrHandSource {
action_grab: CustomClickAction,
action_alt_click: CustomClickAction,
action_show_hide: CustomClickAction,
action_toggle_dashboard: CustomClickAction,
action_space_drag: CustomClickAction,
action_space_rotate: CustomClickAction,
action_space_reset: CustomClickAction,
@@ -365,6 +366,12 @@ impl OpenXrHand {
session,
)?;
pointer.now.toggle_dashboard = self.source.action_toggle_dashboard.state(
pointer.before.toggle_dashboard,
xr,
session,
)?;
pointer.now.click_modifier_middle = self.source.action_modifier_middle.state(
pointer.before.click_modifier_middle,
xr,
@@ -422,6 +429,7 @@ impl OpenXrHandSource {
action_scroll,
action_alt_click: CustomClickAction::new(action_set, "alt_click", side)?,
action_show_hide: CustomClickAction::new(action_set, "show_hide", side)?,
action_toggle_dashboard: CustomClickAction::new(action_set, "toggle_dashboard", side)?,
action_space_drag: CustomClickAction::new(action_set, "space_drag", side)?,
action_space_rotate: CustomClickAction::new(action_set, "space_rotate", side)?,
action_space_reset: CustomClickAction::new(action_set, "space_reset", side)?,
@@ -578,6 +586,14 @@ fn suggest_bindings(instance: &xr::Instance, hands: &[&OpenXrHandSource; 2]) ->
instance
);
add_custom!(
profile.toggle_dashboard,
&hands[0].action_toggle_dashboard,
&hands[1].action_toggle_dashboard,
bindings,
instance
);
add_custom!(
profile.space_drag,
&hands[0].action_space_drag,
@@ -655,6 +671,7 @@ struct OpenXrActionConfProfile {
grab: Option<OpenXrActionConfAction>,
alt_click: Option<OpenXrActionConfAction>,
show_hide: Option<OpenXrActionConfAction>,
toggle_dashboard: Option<OpenXrActionConfAction>,
space_drag: Option<OpenXrActionConfAction>,
space_rotate: Option<OpenXrActionConfAction>,
space_reset: Option<OpenXrActionConfAction>,

View File

@@ -32,7 +32,7 @@ use crate::{
};
#[cfg(feature = "wayvr")]
use crate::overlays::wayvr::wayvr_action;
use crate::overlays::wayvr::{wayvr_action, WayVRAction};
mod helpers;
mod input;
@@ -291,6 +291,16 @@ pub fn openxr_run(running: Arc<AtomicBool>, show_by_default: bool) -> Result<(),
overlays.show_hide(&mut app_state);
}
#[cfg(feature = "wayvr")]
if app_state
.input_state
.pointers
.iter()
.any(|p| p.now.toggle_dashboard && !p.before.toggle_dashboard)
{
wayvr_action(&mut app_state, &mut overlays, &WayVRAction::ToggleDashboard);
}
watch_fade(&mut app_state, overlays.mut_by_id(watch_id).unwrap()); // want panic
if let Some(ref mut space_mover) = playspace {
space_mover.update(
@@ -414,7 +424,7 @@ pub fn openxr_run(running: Arc<AtomicBool>, show_by_default: bool) -> Result<(),
#[cfg(feature = "wayvr")]
if let Some(wayvr) = &app_state.wayvr {
wayvr.borrow_mut().state.tick_finish()?;
wayvr.borrow_mut().data.tick_finish()?;
}
command_buffer.build_and_execute_now()?;

View File

@@ -12,6 +12,9 @@
// -- space_drag --
// move your stage (playspace drag)
//
// -- toggle_dashboard --
// run or toggle visibility of a previously configured WayVR-compatible dashboard
//
// -- space_rotate --
// rotate your stage (playspace rotate, WIP)
//
@@ -127,6 +130,10 @@
left: "/user/hand/left/input/thumbstick/y",
right: "/user/hand/right/input/thumbstick/y"
},
toggle_dashboard: {
double_click: false,
right: "/user/hand/right/input/system/click",
},
show_hide: {
double_click: true,
left: "/user/hand/left/input/b/click",