diff options
| author | LLLL Colonq <llll@colonq> | 2026-05-11 16:44:10 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-05-11 16:44:10 -0400 |
| commit | 01de6b0b0e347267f76c71679834c2ceb5aa299b (patch) | |
| tree | 025b3818d1b8438c46a9886dae82329617d7bf35 /crates | |
| parent | 1f07fdcd9251128ad5df5c313ea64dd79e51fc54 (diff) | |
Fix WASM
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/teleia/src/lib.rs | 13 | ||||
| -rw-r--r-- | crates/teleia/src/script.rs | 2 |
2 files changed, 4 insertions, 11 deletions
diff --git a/crates/teleia/src/lib.rs b/crates/teleia/src/lib.rs index 9a55d10..32e2e9c 100644 --- a/crates/teleia/src/lib.rs +++ b/crates/teleia/src/lib.rs @@ -75,13 +75,6 @@ where log::info!("hello computer, starting up..."); - unsafe { - let mut out = vec![' ' as u8; 1024]; - let buf = std::alloc::alloc(std::alloc::Layout::from_size_align(256 * 1024 * 1024, 64).unwrap()); - log::info!("pit_runtime_test: {:?}", crate::script::pit_runtime_test(out.as_mut_ptr(), out.len() as i64, buf, 256 * 1024 * 1024)); - log::info!("out: {}", String::from_utf8(out).unwrap()); - } - let (rglfw, rwindow, gl, events) = { use glfw::fail_on_errors; let mut glfw = glfw::init(glfw::fail_on_errors!()).expect("failed to initialize GLFW"); @@ -283,7 +276,7 @@ where st.mouse_pressed(&ctx, game)?; }, winit::event::ElementState::Released => { - st.mouse_released(&ctx)?; + st.mouse_released(&ctx, game)?; }, } winit::event::WindowEvent::KeyboardInput { @@ -296,10 +289,10 @@ where .. } => match state { winit::event::ElementState::Pressed => { - st.key_pressed(&ctx, state::Keycode { kc: *key })?; + st.key_pressed(&ctx, game, state::Keycode { kc: *key })?; }, winit::event::ElementState::Released => { - st.key_released(&ctx, state::Keycode { kc: *key })?; + st.key_released(&ctx, game, state::Keycode { kc: *key })?; }, } _ => {}, diff --git a/crates/teleia/src/script.rs b/crates/teleia/src/script.rs index 8eaf85a..6995dba 100644 --- a/crates/teleia/src/script.rs +++ b/crates/teleia/src/script.rs @@ -2,7 +2,7 @@ use std::{ffi::c_int, mem::MaybeUninit}; use crate::utils; -const NIL: Value = Value { val: PitValue { data: 0xfff4000000000000 } }; +pub const NIL: Value = Value { val: PitValue { data: 0xfff4000000000000 } }; #[derive(Debug)] pub struct Error { |
