From 045a159fa53b61dd79dff405158f66f952322a9d Mon Sep 17 00:00:00 2001 From: Astatin Date: Wed, 18 Jun 2025 19:00:19 +0200 Subject: Set default zoom to x4 + add --title option to change window titles --- src/desktop/window.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/desktop/window.rs') diff --git a/src/desktop/window.rs b/src/desktop/window.rs index 78a7c42..2fea3e5 100644 --- a/src/desktop/window.rs +++ b/src/desktop/window.rs @@ -35,13 +35,13 @@ fn draw(frame: &mut [u8], fb: &[u32; 160 * 144]) { } impl<'a> DesktopWindow<'a> { - pub fn new() -> Result { + pub fn new(title: impl Into) -> Result { let event_loop = EventLoop::new().unwrap(); let input = WinitInputHelper::new(); let window = Arc::new({ - let size = LogicalSize::new(WIDTH as f64, HEIGHT as f64); + let size = LogicalSize::new((WIDTH * 4) as f64, (HEIGHT * 4) as f64); WindowBuilder::new() - .with_title("Gameboy Emulator") + .with_title(title.into()) .with_inner_size(size) .with_min_inner_size(size) .build(&event_loop) -- cgit v1.2.3-70-g09d2