mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
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>
This commit is contained in:
parent
3e2834fe72
commit
07078c2966
@ -83,11 +83,14 @@ static void fb_open(const char *strfb_device)
|
|||||||
|
|
||||||
// map the device in memory
|
// map the device in memory
|
||||||
G.addr = mmap(NULL,
|
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)*/,
|
* BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/,
|
||||||
PROT_WRITE, MAP_SHARED, fbfd, 0);
|
PROT_WRITE, MAP_SHARED, fbfd, 0);
|
||||||
if (G.addr == MAP_FAILED)
|
if (G.addr == MAP_FAILED)
|
||||||
bb_perror_msg_and_die("mmap");
|
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);
|
close(fbfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user