mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix back buffer swapping
This commit is contained in:
parent
f922274070
commit
8baaf201e6
1 changed files with 5 additions and 2 deletions
|
|
@ -146,7 +146,10 @@ impl<'a> Oled128x128 {
|
||||||
|
|
||||||
pub fn screen_size(&self) -> Point { Point::new(WIDTH, LINES) }
|
pub fn screen_size(&self) -> Point { Point::new(WIDTH, LINES) }
|
||||||
|
|
||||||
pub fn redraw(&mut self) { self.draw(); }
|
pub fn redraw(&mut self) {
|
||||||
|
self.draw();
|
||||||
|
self.buffer_swap();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn set_devboot(&mut self, _ena: bool) {
|
pub fn set_devboot(&mut self, _ena: bool) {
|
||||||
unimplemented!("devboot feature does not exist on this platform");
|
unimplemented!("devboot feature does not exist on this platform");
|
||||||
|
|
@ -183,7 +186,7 @@ impl FrameBuffer for Oled128x128 {
|
||||||
/// Transfers the back buffer
|
/// Transfers the back buffer
|
||||||
fn draw(&mut self) {
|
fn draw(&mut self) {
|
||||||
// this must be opposite of what `buffer` / `buffer_mut` returns
|
// this must be opposite of what `buffer` / `buffer_mut` returns
|
||||||
let buffer = self.buffers[self.active_buffer.swap().as_index()];
|
let buffer = self.buffer();
|
||||||
let mut native_buffer = self.native_buffer.lock().unwrap();
|
let mut native_buffer = self.native_buffer.lock().unwrap();
|
||||||
native_buffer.copy_from_slice(&buffer);
|
native_buffer.copy_from_slice(&buffer);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue