improvements to previous commit
This commit is contained in:
parent
d7b75cf462
commit
2c0be2ccd7
2 changed files with 11 additions and 9 deletions
|
@ -90,7 +90,7 @@ impl FramebufferConsole {
|
|||
self.need_screen_clear = false;
|
||||
}
|
||||
if self.need_line_clear {
|
||||
fb_clear_area(tc, 0, self.cursor.1 * 16, 320, 16);
|
||||
fb_clear_area(tc, 0, self.cursor.1 * 16, 320, 16, refresh_whole_screen);
|
||||
self.need_line_clear = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ pub fn fb_clearscreen(tc: &mut TrafficControl, send_refresh: bool) {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn fb_clear_area(tc: &mut TrafficControl, x: usize, y: usize, w: usize, h: usize) {
|
||||
pub fn fb_clear_area(tc: &mut TrafficControl, x: usize, y: usize, w: usize, h: usize, send_refresh: bool) {
|
||||
const BYTES: [u8; 3] = FB_BG_COLOR.to_bytes();
|
||||
let fbaddr = FRAMEBUFFER_ADDR.load(Ordering::Relaxed);
|
||||
if fbaddr == 0 {
|
||||
|
@ -124,11 +124,13 @@ pub fn fb_clear_area(tc: &mut TrafficControl, x: usize, y: usize, w: usize, h: u
|
|||
}
|
||||
}
|
||||
}
|
||||
framebuffer_update(
|
||||
tc,
|
||||
0,
|
||||
0,
|
||||
FRAMEBUFFER_WIDTH as u32,
|
||||
FRAMEBUFFER_HEIGHT as u32,
|
||||
);
|
||||
if send_refresh {
|
||||
framebuffer_update(
|
||||
tc,
|
||||
0,
|
||||
0,
|
||||
FRAMEBUFFER_WIDTH as u32,
|
||||
FRAMEBUFFER_HEIGHT as u32,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue