graphics/fbcond: Handle framebuffer resize during handoff

This commit is contained in:
bjorn3
2024-12-26 20:57:53 +01:00
parent 09de72e9a8
commit 3ed3ff2edb
+5 -1
View File
@@ -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);