Skip to content

Commit

Permalink
shell: gif window size
Browse files Browse the repository at this point in the history
When displaying a GIF, create a window the size of the gif.

Fixes sunriseos#217
  • Loading branch information
Orycterope authored and roblabla committed Mar 16, 2019
1 parent 6f6d083 commit b7ebdf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shell/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ fn main() {
/// Shows a GIF in a new window, blocking the caller. When a key is pressed, the
/// window is closed and control is given back to the caller.
fn show_gif(louis: &[u8]) {
let mut window = Window::new(0, 0, 1280, 800).unwrap();
let mut reader = gif::Decoder::new(&louis[..]).read_info().unwrap();
let mut window = Window::new(0, 0, u32::from(reader.width()), u32::from(reader.height())).unwrap();
let mut buf = Vec::new();

loop {
Expand Down

0 comments on commit b7ebdf4

Please sign in to comment.