Remove redundant code

This commit is contained in:
Hanno Braun 2025-03-25 21:07:35 +01:00
parent 6fc4675011
commit 850dcce00f
2 changed files with 1 additions and 12 deletions

View File

@ -178,7 +178,7 @@ impl ViewerWindow {
/// Draw the graphics
pub fn draw(&mut self) {
let size_is_invalid = {
let size = self.window.size();
let size = self.window.inner.inner_size();
size.width == 0 || size.height == 0
};
if size_is_invalid {

View File

@ -5,17 +5,6 @@ pub struct Window {
pub inner: Arc<winit::window::Window>,
}
impl Window {
pub fn size(&self) -> WindowSize {
let size = self.inner.inner_size();
WindowSize {
width: size.width,
height: size.height,
}
}
}
/// Cursor position in normalized coordinates (-1 to +1)
///
/// The center of the screen is at (0, 0). The aspect ratio is taken into