diff options
author | Tuomas Siipola | 2019-08-28 21:35:25 +0300 |
---|---|---|
committer | Tuomas Siipola | 2019-08-28 21:35:25 +0300 |
commit | 54118389eb508245b1f7f555522edcc94363e061 (patch) | |
tree | ef4d375e69348237fe3198732cdd62f1b98e2a60 | |
parent | a17c505c729c193fd3563ef36815fa27be6fded8 (diff) |
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 3497689..f4838ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,13 +20,17 @@ fn main() { let sdl_context = sdl2::init().unwrap(); let video_subsystem = sdl_context.video().unwrap(); + let scale = 2; + let window = video_subsystem - .window("Natrix", 320, 240) + .window("Natrix", scale * 320, scale * 240) .position_centered() .build() .unwrap(); let mut canvas = window.into_canvas().software().build().unwrap(); + canvas.set_scale(scale as f32, scale as f32).unwrap(); + let texture_creator = canvas.texture_creator(); let tiles = texture_creator |