Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion crates/renderide-shared/src/shared.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated by SharedTypeGenerator. Please do not modify this file.
// Generated for FrooxEngine, Version=2026.5.27.1300, Culture=neutral, PublicKeyToken=null
// Generated for FrooxEngine, Version=2026.7.7.829, Culture=neutral, PublicKeyToken=null

#![allow(
missing_docs,
Expand Down Expand Up @@ -3336,6 +3336,7 @@ pub struct OutputState {
pub lock_cursor: bool,
pub lock_cursor_position: Option<IVec2>,
pub keyboard_input_active: bool,
pub composition_cursor_position: Option<Vec2>,
pub vr: Option<VROutputState>,
}

Expand All @@ -3344,6 +3345,7 @@ impl MemoryPackable for OutputState {
packer.write_bool(self.lock_cursor);
packer.write_option(self.lock_cursor_position.as_ref());
packer.write_bool(self.keyboard_input_active);
packer.write_option(self.composition_cursor_position.as_ref());
packer.write_object(self.vr.as_mut());
}
fn unpack<P: MemoryPackerEntityPool>(
Expand All @@ -3353,6 +3355,7 @@ impl MemoryPackable for OutputState {
self.lock_cursor = unpacker.read_bool()?;
self.lock_cursor_position = unpacker.read_option()?;
self.keyboard_input_active = unpacker.read_bool()?;
self.composition_cursor_position = unpacker.read_option()?;
self.vr = unpacker.read_object::<VROutputState>()?;
Ok(())
}
Expand Down Expand Up @@ -4589,19 +4592,25 @@ impl MemoryPackable for MouseState {
pub struct KeyboardState {
pub type_delta: Option<String>,
pub held_keys: Vec<Key>,
pub composition_active: bool,
pub composition_text: Option<String>,
}

impl MemoryPackable for KeyboardState {
fn pack(&mut self, packer: &mut MemoryPacker<'_>) {
packer.write_str(self.type_delta.as_deref());
packer.write_enum_value_list(Some(&self.held_keys));
packer.write_bool(self.composition_active);
packer.write_str(self.composition_text.as_deref());
}
fn unpack<P: MemoryPackerEntityPool>(
&mut self,
unpacker: &mut MemoryUnpacker<'_, '_, P>,
) -> Result<(), WireDecodeError> {
self.type_delta = unpacker.read_str()?;
self.held_keys = unpacker.read_enum_value_list()?;
self.composition_active = unpacker.read_bool()?;
self.composition_text = unpacker.read_str()?;
Ok(())
}
}
Expand Down Expand Up @@ -4809,6 +4818,7 @@ impl MemoryPackable for TouchState {
#[derive(Debug, Default, Clone)]
pub struct DisplayState {
pub display_index: i32,
pub monitor_handle: u64,
pub resolution: IVec2,
pub offset: IVec2,
pub refresh_rate: f64,
Expand All @@ -4820,6 +4830,7 @@ pub struct DisplayState {
impl MemoryPackable for DisplayState {
fn pack(&mut self, packer: &mut MemoryPacker<'_>) {
packer.write(&self.display_index);
packer.write(&self.monitor_handle);
packer.write(&self.resolution);
packer.write(&self.offset);
packer.write(&self.refresh_rate);
Expand All @@ -4832,6 +4843,7 @@ impl MemoryPackable for DisplayState {
unpacker: &mut MemoryUnpacker<'_, '_, P>,
) -> Result<(), WireDecodeError> {
self.display_index = unpacker.read()?;
self.monitor_handle = unpacker.read()?;
self.resolution = unpacker.read()?;
self.offset = unpacker.read()?;
self.refresh_rate = unpacker.read()?;
Expand Down
4 changes: 4 additions & 0 deletions crates/renderide/src/diagnostics/hud/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ mod sanitize_input_state_tests {
keyboard: Some(KeyboardState {
type_delta: Some("hi".into()),
held_keys: vec![Key::A],
composition_active: false,
composition_text: None,
}),
window: None,
vr: None,
Expand Down Expand Up @@ -409,6 +411,8 @@ mod sanitize_input_state_tests {
keyboard: Some(KeyboardState {
type_delta: Some("x".into()),
held_keys: vec![],
composition_active: false,
composition_text: None,
}),
window: None,
vr: None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ impl WindowInputAccumulator {
let keyboard = Some(KeyboardState {
type_delta,
held_keys: self.held_keys.clone(),
composition_active: false,
composition_text: None,
});
InputState {
mouse: Some(mouse),
Expand Down