On window resize it pops us which may be annoying when playing same-sized files.
"NihAV player".to_owned()
};
window.set_title(&wname).expect("set window title");
- window.set_size(width as u32, height as u32).expect("resize window");
+ if window.size() != (width as u32, height as u32) {
+ window.set_size(width as u32, height as u32).expect("resize window");
+ }
window.show();
let mut canvas = window.into_canvas().build().expect("should be able to build canvas");
let texture_creator = canvas.texture_creator();