From 024ae4ddd73afe7d0d8f9335e3e0b12ea1bb7435 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 11 Oct 2025 18:36:47 -0700 Subject: [PATCH] refactor: rename flatscreen to force flatscreen --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 26f31d0..bfb119e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,7 +91,7 @@ use bevy::prelude::*; struct CliArgs { /// Force flatscreen mode and use the mouse pointer as a 3D pointer #[clap(short, long, action)] - flatscreen: bool, + force_flatscreen: bool, /// Replaces the flatscreen mode with a first person spectator camera #[clap(short, long, action)] @@ -326,7 +326,7 @@ fn bevy_loop( .async_compute .on_thread_spawn = Some(enter_runtime_context.clone()); plugins = plugins.set(task_pool_plugin); - if args.flatscreen { + if std::env::var("DISPLAY").is_ok() || std::env::var("WAYLAND_DISPLAY").is_ok() { let mut plugin = WinitPlugin::::default(); plugin.run_on_any_thread = true; plugins = plugins.add(plugin).disable::(); @@ -336,7 +336,7 @@ fn bevy_loop( }; } app.add_plugins( - if !args.flatscreen { + if !args.force_flatscreen { add_xr_plugins(plugins) .set(OxrInitPlugin { app_info: AppInfo {