[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] Let fbsplash display images even when a second buffer is
From:       Dan Fandrich <dan () coneharvesters ! com>
Date:       2011-01-26 19:30:34
Message-ID: 20110126193033.GA23676 () coneharvesters ! com
[Download RAW message or body]

If a previous application uses double buffering and makes the
second buffer visible, fbsplash's images (written to the first
buffer) otherwise won't be visible.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
---
 miscutils/fbsplash.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 6b84563..1509923 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -83,11 +83,14 @@ static void fb_open(const char *strfb_device)
 
 	// map the device in memory
 	G.addr = mmap(NULL,
-			G.scr_var.xres * G.scr_var.yres
+			G.scr_var.xres * G.scr_var.yres_virtual
 			* BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/,
 			PROT_WRITE, MAP_SHARED, fbfd, 0);
 	if (G.addr == MAP_FAILED)
 		bb_perror_msg_and_die("mmap");
+
+	// point to the start of the visible screen
+	G.addr += G.scr_var.yoffset * G.scr_fix.line_length + G.scr_var.xoffset * BYTES_PER_PIXEL;
 	close(fbfd);
 }
 
-- 
1.5.3.2

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic