kitgit

tirbofish/dropbear · commit

af45edd095331b3eb0704833799a51bb7fab215c

fix: weird signal bug

Unverified

Thribhu K <4tkbytes@pm.me> · 2026-03-04 01:25

view full diff

diff --git a/crates/eucalyptus-editor/src/editor/input.rs b/crates/eucalyptus-editor/src/editor/input.rs
index ec0d30a..d9681b8 100644
--- a/crates/eucalyptus-editor/src/editor/input.rs
+++ b/crates/eucalyptus-editor/src/editor/input.rs
@@ -93,6 +93,7 @@ impl Keyboard for Editor {
             }
             KeyCode::Escape => {
                 if is_playing {
+                    self.signal = Signal::StopPlaying;
                 } else if is_double_press {
                     if self.selected_entity.is_some() {
                         self.selected_entity = None;
diff --git a/crates/eucalyptus-editor/src/editor/scene.rs b/crates/eucalyptus-editor/src/editor/scene.rs
index 6be5423..523f214 100644
--- a/crates/eucalyptus-editor/src/editor/scene.rs
+++ b/crates/eucalyptus-editor/src/editor/scene.rs
@@ -166,7 +166,7 @@ impl Scene for Editor {
                     self.scene_command = SceneCommand::SetAntialiasing(desired);
                     self.pending_aa_reload = Some(desired);
                 }
-            } else if self.pending_aa_reload.is_some() {
+            } else if self.pending_aa_reload.is_some() && matches!(self.signal, Signal::None) {
                 log::debug!("Anti aliasing mode applied, reloading WGPU data");
                 self.signal = Signal::ReloadWGPUData {
                     skybox_texture: None,
@@ -250,12 +250,6 @@ impl Scene for Editor {
             self.is_viewport_focused = false;
         }
 
-        if matches!(self.editor_state, EditorState::Playing) {
-            if self.input_state.pressed_keys.contains(&KeyCode::Escape) {
-                self.signal = Signal::StopPlaying;
-            }
-        }
-
         if self.is_viewport_focused
             && matches!(self.viewport_mode, ViewportMode::CameraMove)
             && !matches!(self.editor_state, EditorState::Playing)
diff --git a/crates/eucalyptus-editor/src/editor/viewport.rs b/crates/eucalyptus-editor/src/editor/viewport.rs
index 6c02e31..9c98624 100644
--- a/crates/eucalyptus-editor/src/editor/viewport.rs
+++ b/crates/eucalyptus-editor/src/editor/viewport.rs
@@ -15,12 +15,13 @@ impl<'a> EditorTabViewer<'a> {
 
         let available_rect = ui.available_rect_before_wrap();
         let available_size = available_rect.size();
+        let pixels_per_point = ui.ctx().pixels_per_point();
 
-        let desired_width = available_size.x.max(1.0).round() as u32;
-        let desired_height = available_size.y.max(1.0).round() as u32;

Large diffs are not rendered by default. Showing the first 50 of 98 lines. Show full diff