update libmonado
This commit is contained in:
928
Cargo.lock
generated
928
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -56,7 +56,7 @@ thiserror = "2.0.3"
|
|||||||
vulkano = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
|
vulkano = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
|
||||||
vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
|
vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
|
||||||
wlx-capture = { git = "https://github.com/galister/wlx-capture", tag = "v0.4.2", default-features = false }
|
wlx-capture = { git = "https://github.com/galister/wlx-capture", tag = "v0.4.2", default-features = false }
|
||||||
libmonado-rs = { git = "https://github.com/technobaboo/libmonado-rs", rev = "a495f6d", optional = true }
|
libmonado = { git = "https://github.com/technobaboo/libmonado-rs", rev = "256895b18c8f9368174fad8a6232ff07764eeacb", optional = true }
|
||||||
winit = { version = "0.30.0", optional = true }
|
winit = { version = "0.30.0", optional = true }
|
||||||
xdg = "2.5.2"
|
xdg = "2.5.2"
|
||||||
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
|
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
|
||||||
@@ -95,7 +95,7 @@ regex = { version = "*" }
|
|||||||
[features]
|
[features]
|
||||||
default = ["openvr", "openxr", "osc", "x11", "wayland", "wayvr"]
|
default = ["openvr", "openxr", "osc", "x11", "wayland", "wayvr"]
|
||||||
openvr = ["dep:ovr_overlay", "dep:json"]
|
openvr = ["dep:ovr_overlay", "dep:json"]
|
||||||
openxr = ["dep:openxr", "dep:libmonado-rs"]
|
openxr = ["dep:openxr", "dep:libmonado"]
|
||||||
osc = ["dep:rosc"]
|
osc = ["dep:rosc"]
|
||||||
x11 = ["dep:xcb", "wlx-capture/xshm", "xkbcommon/x11"]
|
x11 = ["dep:xcb", "wlx-capture/xshm", "xkbcommon/x11"]
|
||||||
wayland = ["pipewire", "wlx-capture/wlr", "xkbcommon/wayland"]
|
wayland = ["pipewire", "wlx-capture/wlr", "xkbcommon/wayland"]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use glam::{bool, Affine3A, Quat, Vec3};
|
use glam::{bool, Affine3A, Quat, Vec3};
|
||||||
use libmonado_rs::{Device, Monado};
|
use libmonado as mnd;
|
||||||
use openxr::{self as xr, Quaternionf, Vector3f};
|
use openxr::{self as xr, Quaternionf, Vector3f};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ impl OpenXrInputSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn update_device_battery_status(
|
fn update_device_battery_status(
|
||||||
device: &mut Device,
|
device: &mut mnd::Device,
|
||||||
role: TrackedDeviceRole,
|
role: TrackedDeviceRole,
|
||||||
app: &mut AppState,
|
app: &mut AppState,
|
||||||
) {
|
) {
|
||||||
@@ -251,17 +251,23 @@ impl OpenXrInputSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_devices(&mut self, app: &mut AppState, monado: &mut Monado) {
|
pub fn update_devices(&mut self, app: &mut AppState, monado: &mut mnd::Monado) {
|
||||||
app.input_state.devices.clear();
|
app.input_state.devices.clear();
|
||||||
|
|
||||||
let roles = [
|
let roles = [
|
||||||
("head", TrackedDeviceRole::Hmd),
|
(mnd::DeviceRole::Head, TrackedDeviceRole::Hmd),
|
||||||
("eyes", TrackedDeviceRole::None),
|
(mnd::DeviceRole::Eyes, TrackedDeviceRole::None),
|
||||||
("left", TrackedDeviceRole::LeftHand),
|
(mnd::DeviceRole::Left, TrackedDeviceRole::LeftHand),
|
||||||
("right", TrackedDeviceRole::RightHand),
|
(mnd::DeviceRole::Right, TrackedDeviceRole::RightHand),
|
||||||
("gamepad", TrackedDeviceRole::None),
|
(mnd::DeviceRole::Gamepad, TrackedDeviceRole::None),
|
||||||
("hand-tracking-left", TrackedDeviceRole::LeftHand),
|
(
|
||||||
("hand-tracking-right", TrackedDeviceRole::RightHand),
|
mnd::DeviceRole::HandTrackingLeft,
|
||||||
|
TrackedDeviceRole::LeftHand,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
mnd::DeviceRole::HandTrackingRight,
|
||||||
|
TrackedDeviceRole::RightHand,
|
||||||
|
),
|
||||||
];
|
];
|
||||||
let mut seen = Vec::<u32>::with_capacity(32);
|
let mut seen = Vec::<u32>::with_capacity(32);
|
||||||
for (mnd_role, wlx_role) in roles {
|
for (mnd_role, wlx_role) in roles {
|
||||||
@@ -276,7 +282,7 @@ impl OpenXrInputSource {
|
|||||||
if let Ok(devices) = monado.devices() {
|
if let Ok(devices) = monado.devices() {
|
||||||
for mut device in devices {
|
for mut device in devices {
|
||||||
if !seen.contains(&device.index) {
|
if !seen.contains(&device.index) {
|
||||||
let role = if device.id >= 4 && device.id <= 8 {
|
let role = if device.name_id >= 4 && device.name_id <= 8 {
|
||||||
TrackedDeviceRole::Tracker
|
TrackedDeviceRole::Tracker
|
||||||
} else {
|
} else {
|
||||||
TrackedDeviceRole::None
|
TrackedDeviceRole::None
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use glam::{Affine3A, Vec3};
|
use glam::{Affine3A, Vec3};
|
||||||
use libmonado_rs::Monado;
|
use libmonado::Monado;
|
||||||
use openxr as xr;
|
use openxr as xr;
|
||||||
use skybox::create_skybox;
|
use skybox::create_skybox;
|
||||||
use vulkano::{command_buffer::CommandBufferUsage, Handle, VulkanObject};
|
use vulkano::{command_buffer::CommandBufferUsage, Handle, VulkanObject};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use glam::{Affine3A, Quat, Vec3A};
|
use glam::{Affine3A, Quat, Vec3A};
|
||||||
use libmonado_rs::{Monado, Pose, ReferenceSpaceType};
|
use libmonado::{Monado, Pose, ReferenceSpaceType};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
backend::{common::OverlayContainer, input::InputState},
|
backend::{common::OverlayContainer, input::InputState},
|
||||||
|
|||||||
Reference in New Issue
Block a user