Hi Simo,

On Wed, 18 Feb 2015 07:15:22 +0200 Siarhei Siamashka wrote:
> On Wed, 18 Feb 2015 07:08:42 +0200 Siarhei Siamashka wrote:
> > On Fri, 13 Feb 2015 09:04:48 -0800 (PST) Simo Xefil wrote:
> > There are surely plenty of ways to clear the framebuffer. And you can
> > also even make a copy of the old framebuffer data and restore it after
> > the application has terminated. Everything is up to you. Or up to the
> > developers of the framebuffer based applications.
> > 
> > > With an emulator, where I could need switch between games often, every 
> > > time 
> > > I quit the game, the image remains impressed and I cannot change it.
> > >
> > > I've no idea how to invent a way to force the refresh. If you have an 
> > > idea 
> > > I would try to investigate in that direction.
> > > I don't expect a finished solution (even it, in case, would be of course 
> > > appreciated). I'd try to find/try by myself, but have no idea where to 
> > > search.
> > > 
> > > Any suggestion is really welcome :-)
> > 
> > Does, for example, running "cat /dev/zero > /dev/fb0" help?
> 
> Or create a simple wrapper shell script, which might look like:
> 
> #!/bin/sh
> 
> dd if=/dev/fb0 of=/tmp/fbbackup.bin
> <run-your-cool-game-or-emulator>
> dd if=/tmp/fbbackup.bin of=/dev/fb0

If I remember correctly, in you application you can switching current VT
from TEXT mode into GRAPHICS mode so the kernel stops interfering with
the framebuffer and once you revert the VT to TEXT mode kernel will
just redraw the whole console, erasing what your application left
around.

If you want to have things operate properly in case of application
mis-behavior/crash you probably need a wrapper process to perform that
work and react to VT switches (STOP your application when leaving VT,
resume it when coming back).

Bruno

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to