Skip to content

Commit

Permalink
Fix crash wgpu: emilk/egui#2038
Browse files Browse the repository at this point in the history
  • Loading branch information
ar37-rs committed Sep 12, 2022
1 parent 9a07eca commit 41aaabe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui-fltk-frontend"
version = "0.22.0"
version = "0.22.1"
edition = "2021"
rust-version = "1.61.0"
authors = ["Ar37-rs <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev lib

```toml
[dependencies]
egui-fltk-frontend = "0.22"
egui-fltk-frontend = "0.22.1"
```

Note:
Expand Down
2 changes: 1 addition & 1 deletion examples/main_example/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "main_example"
version = "0.22.0"
version = "0.22.1"
edition = "2021"
rust-version = "1.61"
authors = ["Ar37-rs <[email protected]>"]
Expand Down
7 changes: 2 additions & 5 deletions src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,14 +886,11 @@ impl ScissorRect {
let clip_max_x = clip_max_x.clamp(clip_min_x, target_size[0]);
let clip_max_y = clip_max_y.clamp(clip_min_y, target_size[1]);

let width = (clip_max_x - clip_min_x).at_least(1);
let height = (clip_max_y - clip_min_y).at_least(1);

ScissorRect {
x: clip_min_x,
y: clip_min_y,
width,
height,
width: clip_max_x - clip_min_x,
height: clip_max_y - clip_min_y,
}
}
}

0 comments on commit 41aaabe

Please sign in to comment.