From b0260ce315a6f3ed5a3010b5bcd93951eb0500e8 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Mon, 2 Jan 2023 23:07:24 -0700 Subject: [PATCH] [NO TESTS] WIP --- src/device/video_sdl2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/device/video_sdl2.rs b/src/device/video_sdl2.rs index 6da48a8..63fce54 100644 --- a/src/device/video_sdl2.rs +++ b/src/device/video_sdl2.rs @@ -46,13 +46,13 @@ impl Sdl2VideoDevice { fn clear(&mut self) { { - let fg = self.fg.borrow_mut(); + let mut fg = self.fg.borrow_mut(); for i in 0..(self.width * self.height) as usize { fg.pixels[i] = 0x00; } } { - let bg = self.bg.borrow_mut(); + let mut bg = self.bg.borrow_mut(); for i in 0..(self.width * self.height) as usize { bg.pixels[i] = 0x00; } @@ -63,7 +63,7 @@ impl Sdl2VideoDevice { * Update an entry in either the foreground or background buffers, marking the buffer as dirty. */ fn write_pixel(&mut self, layer: bool, x: u16, y: u16, color: u8) { - let layer = if layer { + let mut layer = if layer { self.fg.borrow_mut() } else { self.bg.borrow_mut()