mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 02:18:28 +00:00
Remove redundant code
This commit is contained in:
parent
6fc4675011
commit
850dcce00f
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user