graphics/fbcond: Handle framebuffer resize during handoff
This commit is contained in:
@@ -61,11 +61,13 @@ impl Display {
|
||||
|
||||
let (mut new_display_file, width, height) = Self::open_display(&self.input_handle).unwrap();
|
||||
|
||||
eprintln!("fbcond: Opened new display");
|
||||
eprintln!("fbcond: Opened new display with size {width}x{height}");
|
||||
|
||||
match display_fd_map(width, height, &mut new_display_file) {
|
||||
Ok(offscreen) => {
|
||||
self.offscreen = offscreen;
|
||||
self.width = width;
|
||||
self.height = height;
|
||||
self.display_file = new_display_file;
|
||||
|
||||
eprintln!("fbcond: Mapped new display");
|
||||
@@ -108,6 +110,8 @@ impl Display {
|
||||
match display_fd_map(width, height, &mut self.display_file) {
|
||||
Ok(offscreen) => {
|
||||
self.offscreen = offscreen;
|
||||
self.width = width;
|
||||
self.height = height;
|
||||
}
|
||||
Err(err) => {
|
||||
eprintln!("failed to resize display to {}x{}: {}", width, height, err);
|
||||
|
||||
Reference in New Issue
Block a user