WayVR: Read the WAYVR_DISPLAY_AUTH environment variable from external processes, matching it to our virtual display.

This enables applications to be run via Flatpak or any other wrapper application.
This commit is contained in:
Aleksander
2025-03-09 21:14:50 +01:00
parent 0b7cd61d05
commit 91af7c99b1
4 changed files with 83 additions and 40 deletions

View File

@@ -3,7 +3,6 @@ use once_cell::sync::Lazy;
use serde::{Deserialize, Serialize};
use std::{
f32::consts::PI,
ops::Add,
ptr,
sync::{atomic::AtomicU64, Arc},
time::{Duration, Instant},
@@ -151,7 +150,8 @@ impl InteractionHandler for ScreenInteractionHandler {
app.hid_provider.mouse_move(pos);
}
fn on_scroll(&mut self, app: &mut AppState, _hit: &PointerHit, delta_y: f32, delta_x: f32) {
app.hid_provider.wheel((delta_y*64.) as i32, (delta_x*64.) as i32)
app.hid_provider
.wheel((delta_y * 64.) as i32, (delta_x * 64.) as i32)
}
fn on_left(&mut self, _app: &mut AppState, _hand: usize) {}
}