Skip to content

Commit

Permalink
reenable mac support by disabling xr on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Nov 19, 2023
1 parent 1bd110d commit 73aa580
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ bevy = { version = "0.12", features = [
"jpeg",
] } ## NOT the local file bevy, the one from the net
bevy_flycam = { git = "https://github.com/sburris0/bevy_flycam" } ## control
bevy_oxr = { git = "https://github.com/awtterpip/bevy_openxr" }
bevy_oxr = { git = "https://github.com/awtterpip/bevy_openxr", optional = true }
## bevy_config_cam = { git = "https://github.com/BlackPhlox/bevy_config_cam" } ## { version = "0.3.0"}
glam = "0"


[features]
#xr = ["bevy_oxr"]
xr = ["dep:bevy_oxr"]

[target.'cfg(not(target_os="macos"))'.features]
default = ["xr"]
#jpeg = ["bevy_internal/jpeg"]


Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ use bevy::{
};
use std::f32::consts::*;
use tilemap::TileMap;
#[cfg(feature = "xr")]
use xr::XRPlugin;

use bevy_flycam::prelude::*;
#[cfg(feature = "xr")]
use bevy_oxr::DefaultXrPlugins;

mod tilemap;
#[cfg(feature = "xr")]
mod xr;

fn main() {
let mut app = App::new();
if std::env::args().any(|arg| arg == "xr") {
#[cfg(feature = "xr")]
app.add_plugins(DefaultXrPlugins).add_plugins(XRPlugin);
} else {
app.add_plugins(DefaultPlugins);
Expand Down

0 comments on commit 73aa580

Please sign in to comment.