Screen is not cleared before nor after the image is shown
I'm using fbv on my Raspberry Pi using a system build with buildroot. However, the screen is not cleared before nor after showing the image. As the package in the official buildroot repo still uses the old sources from http://s-tech.elsat.net.pl/fbv, I gave this newer version a try an compiled it. But the outcome is the same: the screen is not cleared, although the documentation of the parameter "--dontclear" makes me expecting that the screen should be cleared if this parameter is not set.
My additional observations are, that "--widthonly" and "--heightonly" don't have any effect. This features were my initial reason to switch to this version :-)
Any suggestions how I can investigate deeper would be highly appreciated, as I don't know how to continue.
you should try this snippet of code to see whether it can clear the screen.
#include <stdio.h>
int main()
{
printf("\033[H\033[J");
fflush(stdout);
return 0;
}
Thanks, that helped to nail it down: I'm starting fbv from a virtual (ssh) console and it draws the image successfully to /dev/fb0. However, the clear command is executed on the virtual console and not to the framebuffer. Is this intended?
My problem comes from a simple use-case: Slideshow If the first image covers the whole screen, but the second image is smaller, I don't want to see parts of the previous image.
As a workaround I can do dd if=/dev/zero of /dev/fb0
However, this way I cannot use the slideshow option of fbv, as the screen is not cleared between images.
Before spending time in creating a patch, I want some feedback if this is the way to go:
- Creating an additional comman line parameter "clear fb before drawing"
- Everytime, fbv is going to show a new image, I write zeros to the frame buffer.
What do you think?
I think the second one is a better option