Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbf31e1df7 | ||
|
|
d1043f7b8c | ||
|
|
a9e4d91f9a |
15
src/main.rs
15
src/main.rs
@@ -27,7 +27,7 @@ use bevy::render::settings::{Backends, RenderCreation, WgpuSettings};
|
|||||||
use bevy::render::{RenderDebugFlags, RenderPlugin};
|
use bevy::render::{RenderDebugFlags, RenderPlugin};
|
||||||
use bevy::scene::ScenePlugin;
|
use bevy::scene::ScenePlugin;
|
||||||
use bevy::window::{CompositeAlphaMode, PresentMode};
|
use bevy::window::{CompositeAlphaMode, PresentMode};
|
||||||
use bevy::winit::{WakeUp, WinitPlugin};
|
use bevy::winit::{WakeUp, WinitPlugin, WinitSettings, UpdateMode};
|
||||||
use bevy_dmabuf::import::DmabufImportPlugin;
|
use bevy_dmabuf::import::DmabufImportPlugin;
|
||||||
use bevy_mod_openxr::action_set_attaching::OxrActionAttachingPlugin;
|
use bevy_mod_openxr::action_set_attaching::OxrActionAttachingPlugin;
|
||||||
use bevy_mod_openxr::action_set_syncing::OxrActionSyncingPlugin;
|
use bevy_mod_openxr::action_set_syncing::OxrActionSyncingPlugin;
|
||||||
@@ -315,10 +315,10 @@ fn bevy_loop(
|
|||||||
.async_compute
|
.async_compute
|
||||||
.on_thread_spawn = Some(enter_runtime_context.clone());
|
.on_thread_spawn = Some(enter_runtime_context.clone());
|
||||||
plugins = plugins.set(task_pool_plugin);
|
plugins = plugins.set(task_pool_plugin);
|
||||||
if args.flatscreen
|
let flatscreenmode = args.flatscreen
|
||||||
|| std::env::var_os("DISPLAY").is_some_and(|s| !s.is_empty())
|
|| std::env::var_os("DISPLAY").is_some_and(|s| !s.is_empty())
|
||||||
|| std::env::var_os("WAYLAND_DISPLAY").is_some_and(|s| !s.is_empty())
|
|| std::env::var_os("WAYLAND_DISPLAY").is_some_and(|s| !s.is_empty());
|
||||||
{
|
if flatscreenmode {
|
||||||
let mut plugin = WinitPlugin::<WakeUp>::default();
|
let mut plugin = WinitPlugin::<WakeUp>::default();
|
||||||
plugin.run_on_any_thread = true;
|
plugin.run_on_any_thread = true;
|
||||||
plugins = plugins
|
plugins = plugins
|
||||||
@@ -378,6 +378,13 @@ fn bevy_loop(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if flatscreenmode {
|
||||||
|
app.insert_resource(WinitSettings {
|
||||||
|
focused_mode: UpdateMode::Continuous,
|
||||||
|
unfocused_mode: UpdateMode::Continuous,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
app.add_plugins(bevy_sk::hand::HandPlugin);
|
app.add_plugins(bevy_sk::hand::HandPlugin);
|
||||||
// app.add_plugins(HandGizmosPlugin);
|
// app.add_plugins(HandGizmosPlugin);
|
||||||
app.world_mut().resource_mut::<AmbientLight>().brightness = 1000.0;
|
app.world_mut().resource_mut::<AmbientLight>().brightness = 1000.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user