diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2011-01-26 11:30:34 -0800 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-05 03:34:52 +0100 |
commit | 07078c29663c6530e6a35b136422448c3bd6d105 (patch) | |
tree | b1c0520c4e393a5abbbe1f4ba27c2a05d18f8846 | |
parent | 3e2834fe72b023155904e118c4f71a8ff73a90ec (diff) | |
download | busybox-w32-07078c29663c6530e6a35b136422448c3bd6d105.tar.gz busybox-w32-07078c29663c6530e6a35b136422448c3bd6d105.tar.bz2 busybox-w32-07078c29663c6530e6a35b136422448c3bd6d105.zip |
Let fbsplash display images even when a second buffer is active
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>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/fbsplash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 6b84563a3..150992343 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
@@ -83,11 +83,14 @@ static void fb_open(const char *strfb_device) | |||
83 | 83 | ||
84 | // map the device in memory | 84 | // map the device in memory |
85 | G.addr = mmap(NULL, | 85 | G.addr = mmap(NULL, |
86 | G.scr_var.xres * G.scr_var.yres | 86 | G.scr_var.xres * G.scr_var.yres_virtual |
87 | * BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/, | 87 | * BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/, |
88 | PROT_WRITE, MAP_SHARED, fbfd, 0); | 88 | PROT_WRITE, MAP_SHARED, fbfd, 0); |
89 | if (G.addr == MAP_FAILED) | 89 | if (G.addr == MAP_FAILED) |
90 | bb_perror_msg_and_die("mmap"); | 90 | bb_perror_msg_and_die("mmap"); |
91 | |||
92 | // point to the start of the visible screen | ||
93 | G.addr += G.scr_var.yoffset * G.scr_fix.line_length + G.scr_var.xoffset * BYTES_PER_PIXEL; | ||
91 | close(fbfd); | 94 | close(fbfd); |
92 | } | 95 | } |
93 | 96 | ||