From 4d7b4fabdcefa92c323f7c0268b8e904d8fbdf3b Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:52:16 +0900 Subject: [PATCH] only redraw after canvas changed --- src/backend/openxr/helpers.rs | 2 +- src/backend/uidev/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/openxr/helpers.rs b/src/backend/openxr/helpers.rs index 7ba86b5..8c93b58 100644 --- a/src/backend/openxr/helpers.rs +++ b/src/backend/openxr/helpers.rs @@ -26,7 +26,7 @@ pub(super) fn init_xr() -> Result<(xr::Instance, xr::SystemId), anyhow::Error> { enabled_extensions.ext_dpad_binding = true; } else { log::warn!("Missing EXT_dpad_binding extension."); - } + } if available_extensions.ext_hp_mixed_reality_controller { enabled_extensions.ext_hp_mixed_reality_controller = true; } else { diff --git a/src/backend/uidev/mod.rs b/src/backend/uidev/mod.rs index 720243f..6b9a667 100644 --- a/src/backend/uidev/mod.rs +++ b/src/backend/uidev/mod.rs @@ -162,6 +162,7 @@ pub fn uidev_run(panel_name: &str) -> anyhow::Result<()> { .unwrap(), ); recreate = false; + window.request_redraw(); } { @@ -220,7 +221,6 @@ pub fn uidev_run(panel_name: &str) -> anyhow::Result<()> { } } } - Event::AboutToWait => window.request_redraw(), _ => (), } })?;