diff options
| author | LLLL Colonq <llll@colonq> | 2025-05-02 22:31:01 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-05-02 22:31:01 -0400 |
| commit | 5498b870549c7ede59dacac28ee358b8e2c57e4f (patch) | |
| tree | 063ec4bb1a57d54ac947a8dc6b55ebb0d6a55292 /crates | |
| parent | 6f1269aab5f4d7e218e7f59bd82b34f6dcaed4a1 (diff) | |
Fix build for WASM
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/teleia/src/state.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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)] |
