From 5498b870549c7ede59dacac28ee358b8e2c57e4f Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 2 May 2025 22:31:01 -0400 Subject: Fix build for WASM --- crates/teleia/src/state.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates') diff --git a/crates/teleia/src/state.rs b/crates/teleia/src/state.rs index 78aac91..e016411 100644 --- a/crates/teleia/src/state.rs +++ b/crates/teleia/src/state.rs @@ -100,6 +100,12 @@ type Timestamp = f64; #[cfg(target_arch = "wasm32")] pub type Keycode = winit::keyboard::KeyCode; +#[cfg(target_arch = "wasm32")] +impl Display for Keycode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.kc) + } +} #[cfg(not(target_arch = "wasm32"))] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -- cgit v1.2.3