Reset framebuffer clear color back to black
This commit is contained in:
parent
1dc961310e
commit
4343a4a926
@ -94,14 +94,14 @@ impl Bga {
|
|||||||
}
|
}
|
||||||
self.draw_buffer
|
self.draw_buffer
|
||||||
.resize(xres as usize * yres as usize * 4 * 2, 0);
|
.resize(xres as usize * yres as usize * 4 * 2, 0);
|
||||||
self.draw_buffer.fill(32);
|
self.draw_buffer.fill(0);
|
||||||
self.scroll_offset = 0;
|
self.scroll_offset = 0;
|
||||||
self.xres = xres as usize;
|
self.xres = xres as usize;
|
||||||
self.yres = yres as usize;
|
self.yres = yres as usize;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear(&mut self) {
|
pub fn clear(&mut self) {
|
||||||
self.draw_buffer.fill(32);
|
self.draw_buffer.fill(0);
|
||||||
self.scroll_offset = 0;
|
self.scroll_offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ impl Bga {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let offset = self.row_byte_offset(row);
|
let offset = self.row_byte_offset(row);
|
||||||
self.draw_buffer[offset..][..(self.xres * 4)].fill(32);
|
self.draw_buffer[offset..][..(self.xres * 4)].fill(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear_row(&mut self, row: usize) {
|
pub fn clear_row(&mut self, row: usize) {
|
||||||
|
Loading…
Reference in New Issue
Block a user