graphics/fbcond: Unmap old offscreen buffer on handoff and resize

This commit is contained in:
bjorn3
2024-12-26 21:58:41 +01:00
parent bf6e16c8c9
commit 6f188cf7ef
+8
View File
@@ -65,6 +65,10 @@ impl Display {
match display_fd_map(width, height, &mut new_display_file) {
Ok(offscreen) => {
unsafe {
display_fd_unmap(self.offscreen);
}
self.offscreen = offscreen;
self.width = width;
self.height = height;
@@ -109,6 +113,10 @@ impl Display {
pub fn resize(&mut self, width: usize, height: usize) {
match display_fd_map(width, height, &mut self.display_file) {
Ok(offscreen) => {
unsafe {
display_fd_unmap(self.offscreen);
}
self.offscreen = offscreen;
self.width = width;
self.height = height;