Skip to content

Commit

Permalink
fix egui crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Jan 23, 2024
1 parent bc33cbe commit fed093c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ impl WindowHandler {
egui_renderer.free_texture(&id);
}

let pixels_per_point = egui_winit.egui_ctx().pixels_per_point();
*egui_shapes = egui_winit
.egui_ctx()
.tessellate(egui_output.shapes, wgpu.scale_factor as f32);
.tessellate(egui_output.shapes, pixels_per_point);
}

let (exit, repaint_after) = app.update(&wgpu);
Expand Down Expand Up @@ -346,7 +347,7 @@ impl WindowHandler {
if let Key::Character(ch) = &event.logical_key {
match ch.as_str() {
"v" => app.handle_paste(),
// Egui crashes for some reason if this is not here
// Remove the scufffed egui zoom
"+" => return,
"-" => return,
_ => (),
Expand Down

0 comments on commit fed093c

Please sign in to comment.