mirror of https://github.com/wayvr-org/wayvr.git
fix build with non-default features
This commit is contained in:
parent
feac111949
commit
bffb4c12cf
|
|
@ -14,7 +14,7 @@ use dmabuf::create_dmabuf_image;
|
||||||
use smallvec::smallvec;
|
use smallvec::smallvec;
|
||||||
|
|
||||||
#[cfg(feature = "openvr")]
|
#[cfg(feature = "openvr")]
|
||||||
use vulkano::{device::physical::PhysicalDeviceType, instance::InstanceCreateFlags};
|
use vulkano::instance::InstanceCreateFlags;
|
||||||
|
|
||||||
#[cfg(feature = "openxr")]
|
#[cfg(feature = "openxr")]
|
||||||
use {ash::vk, std::os::raw::c_void};
|
use {ash::vk, std::os::raw::c_void};
|
||||||
|
|
@ -37,7 +37,7 @@ use vulkano::{
|
||||||
allocator::StandardDescriptorSetAllocator, DescriptorSet, WriteDescriptorSet,
|
allocator::StandardDescriptorSetAllocator, DescriptorSet, WriteDescriptorSet,
|
||||||
},
|
},
|
||||||
device::{
|
device::{
|
||||||
physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
|
physical::{PhysicalDevice, PhysicalDeviceType}, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
|
||||||
Queue, QueueCreateInfo, QueueFlags,
|
Queue, QueueCreateInfo, QueueFlags,
|
||||||
},
|
},
|
||||||
format::Format,
|
format::Format,
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ fn auto_run(running: Arc<AtomicBool>, args: Args) {
|
||||||
compile_error!("No desktop support! Enable either wayland or x11 features!");
|
compile_error!("No desktop support! Enable either wayland or x11 features!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code, unused_variables)]
|
||||||
const fn args_get_openvr(args: &Args) -> bool {
|
const fn args_get_openvr(args: &Args) -> bool {
|
||||||
#[cfg(feature = "openvr")]
|
#[cfg(feature = "openvr")]
|
||||||
let ret = args.openvr;
|
let ret = args.openvr;
|
||||||
|
|
@ -176,7 +176,7 @@ const fn args_get_openvr(args: &Args) -> bool {
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code, unused_variables)]
|
||||||
const fn args_get_openxr(args: &Args) -> bool {
|
const fn args_get_openxr(args: &Args) -> bool {
|
||||||
#[cfg(feature = "openxr")]
|
#[cfg(feature = "openxr")]
|
||||||
let ret = args.openxr;
|
let ret = args.openxr;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use std::{
|
||||||
f32::consts::PI,
|
f32::consts::PI,
|
||||||
ptr,
|
ptr,
|
||||||
sync::{atomic::AtomicU64, Arc, LazyLock},
|
sync::{atomic::AtomicU64, Arc, LazyLock},
|
||||||
time::{Duration, Instant},
|
time::Instant,
|
||||||
};
|
};
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
command_buffer::CommandBufferUsage,
|
command_buffer::CommandBufferUsage,
|
||||||
|
|
@ -278,7 +278,6 @@ pub struct ScreenRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ScreenRenderer {
|
impl ScreenRenderer {
|
||||||
#[cfg(feature = "wayland")]
|
|
||||||
pub fn new_raw(
|
pub fn new_raw(
|
||||||
name: Arc<str>,
|
name: Arc<str>,
|
||||||
capture: Box<dyn WlxCapture<WlxCaptureIn, WlxCaptureOut>>,
|
capture: Box<dyn WlxCapture<WlxCaptureIn, WlxCaptureOut>>,
|
||||||
|
|
@ -1107,6 +1106,7 @@ fn select_pw_screen(
|
||||||
multiple: bool,
|
multiple: bool,
|
||||||
) -> Result<PipewireSelectScreenResult, wlx_capture::pipewire::AshpdError> {
|
) -> Result<PipewireSelectScreenResult, wlx_capture::pipewire::AshpdError> {
|
||||||
use crate::backend::notifications::DbusNotificationSender;
|
use crate::backend::notifications::DbusNotificationSender;
|
||||||
|
use std::time::Duration;
|
||||||
use wlx_capture::pipewire::pipewire_select_screen;
|
use wlx_capture::pipewire::pipewire_select_screen;
|
||||||
|
|
||||||
let future = async move {
|
let future = async move {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue