This commit is contained in:
Alex Janka 2023-03-08 15:26:32 +11:00
parent f333723f34
commit e2f1f13ba2

View file

@ -30,6 +30,8 @@ impl Emulator {
} }
} }
const EXTRA_SCALE: usize = 3;
impl Editor for Emulator { impl Editor for Emulator {
fn spawn( fn spawn(
&self, &self,
@ -42,7 +44,7 @@ impl Editor for Emulator {
&parent, &parent,
WindowOpenOptions { WindowOpenOptions {
title: String::from("gb-emu"), title: String::from("gb-emu"),
size: Size::new(WIDTH as f64, HEIGHT as f64), size: Size::new((WIDTH * EXTRA_SCALE) as f64, (HEIGHT * EXTRA_SCALE) as f64),
scale: baseview::WindowScalePolicy::SystemScaleFactor, scale: baseview::WindowScalePolicy::SystemScaleFactor,
gl_config: None, gl_config: None,
}, },
@ -55,7 +57,7 @@ impl Editor for Emulator {
} }
fn size(&self) -> (u32, u32) { fn size(&self) -> (u32, u32) {
(WIDTH as u32, HEIGHT as u32) ((WIDTH * EXTRA_SCALE) as u32, (HEIGHT * EXTRA_SCALE) as u32)
} }
fn set_scale_factor(&self, _factor: f32) -> bool { fn set_scale_factor(&self, _factor: f32) -> bool {