spark: blit framebuffer once per second

Just for the case that some code has not yet added the correct
fb->blit() calls, call it once per second to make sure that
stuff appears on the display.
If you find menus or stuff which is lagging heavily, they are
probably missing those blit() calls.
Of course this has nothing to do with the LED display code,
but putting it there saves us from using yet another thread.
This commit is contained in:
Stefan Seyfried
2012-04-01 13:02:59 +02:00
parent 33c5da3515
commit 366751e85a

View File

@@ -25,6 +25,7 @@
#endif #endif
#include <driver/lcdd.h> #include <driver/lcdd.h>
#include <driver/framebuffer.h>
#include <global.h> #include <global.h>
#include <neutrino.h> #include <neutrino.h>
@@ -86,6 +87,10 @@ void* CLCD::TimeThread(void *)
while(1) { while(1) {
sleep(1); sleep(1);
CLCD::getInstance()->showTime(); CLCD::getInstance()->showTime();
/* hack, just if we missed the blit() somewhere
* this will update the framebuffer once per second */
if (getenv("SPARK_NOBLIT") == NULL)
CFrameBuffer::getInstance()->blit();
} }
return NULL; return NULL;
} }